Der Gelederte Spieler Spawn nicht, jedoch geht der spawn beim login etc.
if(dialogid == Dialog_MakeLeader)
{
if(response)
{
new _frakid[MAX_PLAYERS];
_frakid[playerid] = listitem;
SpielerInfo[ClickedPlayer[playerid]][sLeader] = _frakid[playerid];
new _string[128];
format(_string,sizeof(_string),"Du hast {FFFF00}%s {FFFFFF}zum Leader der Fraktion {FFFF00}%s {FFFFFF}gemacht",PlayerName(ClickedPlayer[playerid]),FrakInfo[_frakid[playerid]][fName]);
SendClientMessage(playerid,Weiß,_string);
format(_string,sizeof(_string),"Du wurdest von {FFFF00}%s {FFFFFF}zum {FFFF00}Leader {FFFFFF}der Fraktion {FFFF00}%s {FFFFFF}gemacht",PlayerName(playerid),FrakInfo[_frakid[playerid]][fName]);
SendClientMessage(ClickedPlayer[playerid],Weiß,_string);
new _query[512];
format(_query,sizeof(_query),"UPDATE fraktionen SET Leader='%s' WHERE ID='%i'",PlayerName(ClickedPlayer[playerid]),_frakid[playerid]);
mysql_query(_query);
SavePlayer(ClickedPlayer[playerid]);
LoadPlayer(ClickedPlayer[playerid]);
SpawnPlayer(ClickedPlayer[playerid]);
LoadFraktion(listitem);
}
}
if(dialogid == Dialog_MakeCoLeader)
{
if(response)
{
new _frakid[MAX_PLAYERS];
_frakid[playerid] = listitem;
SpielerInfo[ClickedPlayer[playerid]][sCoLeader] = _frakid[playerid];
new _string[128];
format(_string,sizeof(_string),"Du hast {FFFF00}%s {FFFFFF}zum {FFFF00}CoLeader {FFFFFF}der Fraktion {FFFF00}%s {FFFFFF}gemacht",PlayerName(ClickedPlayer[playerid]),FrakInfo[_frakid[playerid]][fName]);
SendClientMessage(playerid,Weiß,_string);
format(_string,sizeof(_string),"Du wurdest von {FFFF00}%s {FFFFFF}zum {FFFF00}CoLeader {FFFFFF}der Fraktion {FFFF00}%s gemacht",PlayerName(playerid),FrakInfo[_frakid[playerid]][fName]);
SendClientMessage(ClickedPlayer[playerid],Weiß,_string);
new _query[512];
format(_query,sizeof(_query),"UPDATE fraktionen SET CoLeader='%s' WHERE ID='%i'",PlayerName(ClickedPlayer[playerid]),_frakid[playerid]);
mysql_query(_query);
SavePlayer(ClickedPlayer[playerid]);
LoadPlayer(ClickedPlayer[playerid]);
SpawnPlayer(ClickedPlayer[playerid]);
LoadFraktion(listitem);
}
}
und
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
ClickedPlayer[playerid] = clickedplayerid;
....
}
ich hoffe ihr könnt helfen.
mfg huGGy