Hallo ich habe in meinem Script ein /spawnchange befehl aber er speichert das nicht ab ?
enum playerInfo{
eingeloggt,
level,
db_id,
alevel,
Skin,
fraktion,
rang,
spawnchange
}
savePlayer(playerid)
{
sInfo[playerid][eingeloggt] = 1;
new query[156];
format(query,sizeof(query),"UPDATE user SET level='%i',skin='%i',money='%i',alevel='%i',fraktion='%i',rang='%i',spawnchange='%s' WHERE id='%i'",
GetPlayerScore(playerid),GetPlayerSkin(playerid),GetPlayerMoney(playerid),sInfo[playerid][alevel],sInfo[playerid][fraktion],sInfo[playerid][rang],sInfo[playerid][spawnchange],sInfo[playerid][db_id]);
mysql_function_query(dbhandle,query,false,"","");
return 1;
}
public OnPlayerSpawn(playerid)
{
if(!isPlayerInFrakt(playerid, 0))
{
if(sInfo[playerid][spawnchange]==1)
{
new fID;
fID = sInfo[playerid][fraktion];
SetPlayerPos(playerid, fInfo[fID][f_x],fInfo[fID][f_y],fInfo[fID][f_z]);
SetPlayerFacingAngle(playerid, fInfo[fID][f_r]);
SetPlayerInterior(playerid, fInfo[fID][f_inter]);
SetPlayerVirtualWorld(playerid, fInfo[fID][f_world]);
}
}
SetPlayerSkin(playerid,sInfo[playerid][Skin]);
return 1;
}
ocmd:spawnchange(playerid,params[])
{
if(isPlayerInFrakt(playerid, 0)) return SendClientMessage(playerid,ROT," Du bist in keiner Fraktion.");
if(sInfo[playerid][spawnchange]==0)
{
sInfo[playerid][spawnchange]=1;
return SendClientMessage(playerid,ROT," Du spawnst nun nichtmehr Zuhause");
}
if(sInfo[playerid][spawnchange]==1)
{
sInfo[playerid][spawnchange]=0;
return SendClientMessage(playerid,ROT," Du spawnst nun Zuhause");
}
return 1;
}
public OnPasswordResponse(playerid)
{
new num_fields,num_rows;
cache_get_data(num_rows,num_fields,dbhandle);
if(num_rows==1)
{
//Spieler laden
sInfo[playerid][eingeloggt] = 1;
sInfo[playerid][level] = cache_get_field_content_int(0,"level",dbhandle);
SetPlayerScore(playerid,sInfo[playerid][level]);
sInfo[playerid][Skin] = cache_get_field_content_int(0,"skin",dbhandle);
SetPlayerSkin(playerid,sInfo[playerid][Skin]);
sInfo[playerid][db_id] = cache_get_field_content_int(0,"id",dbhandle);
SetPlayerMoney(playerid,cache_get_field_content_int(0,"money",dbhandle));
sInfo[playerid][alevel] = cache_get_field_content_int(0,"alevel",dbhandle);
sInfo[playerid][fraktion] = cache_get_field_content_int(0,"fraktion",dbhandle);
sInfo[playerid][rang] = cache_get_field_content_int(0,"rang",dbhandle);
sInfo[playerid][spawnchange] = cache_get_field_content_int(0,"spawnchange",dbhandle);
SendClientMessage(playerid,ROT,"*Erfolgreich eingeloggt.");
SendClientMessage(playerid,weiß,"===============|WILLKOMMEN|===============");
SendClientMessage(playerid,Orange,"!!! Playpoint-Reallife - we are the Gamer!!!");
SendClientMessage(playerid,Orange,"!!! Das Orginale...alles andere ist eine Kopie !!!");
SendClientMessage(playerid,weiß,"===============|WILLKOMMEN|===============");
loadPlayerCars(playerid);
}
else
{
SendClientMessage(playerid,ROT,"Das eigegeben Passwort ist fasch");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Willkommen auf Red-Game0v3r-Reallife,\n\n\n\n Bitte logge dich nun ein!\n\n\n","Login","Abbrechen");
}
return 1;
}