Ich habe irgendwie ein Problem mit der Abfrage bei OnPlayerSpawn undso...
Hier mal der Code
//oben
forward Darfs1(playerid);
new Darfs[MAX_PLAYERS];
//OnPlayerConnect
Darfs[playerid]=0;
SetTimer("Darfs1", 15000, 0);
//OnPlayerSpawn
public OnPlayerSpawn(playerid)
{
if(Darfs[playerid] == 0)return SendClientMessage(playerid,neon,"Du darfst nicht spawnen!");
TextDrawHideForPlayer(playerid, SSU);
TextDrawHideForPlayer(playerid, SSO);
TextDrawHideForPlayer(playerid, Start);
TextDrawHideForPlayer(playerid, Start2);
TextDrawHideForPlayer(playerid, Start3);
TextDrawHideForPlayer(playerid, Start4);
TextDrawHideForPlayer(playerid, Start5);
SetPlayerArmour(playerid,100);
SetPlayerInterior(playerid,0);
TextDrawShowForPlayer(playerid, Befehle);
TextDrawShowForPlayer(playerid, mode);
GangZoneShowForPlayer(playerid, SFPARKg, 0x0000FF28);
GangZoneShowForPlayer(playerid, LVAIR, 0x00FF004C);
GangZoneShowForPlayer(playerid, SFAIR, 0xFF80006E);
GangZoneShowForPlayer(playerid, Chilliad, 0x80000024);
GangZoneShowForPlayer(playerid, GroveZone, 0x00800061);
GangZoneShowForPlayer(playerid, Vagos, 0xFFFF0096);
GangZoneShowForPlayer(playerid, Aztecas, 0xFF000096);
GangZoneShowForPlayer(playerid, Ballas, 0xFF008096);
GangZoneShowForPlayer(playerid, LSPD, 0x0000FF96);
AntiDeAMX();
if(gTeam[playerid] == TEAM_GROVE)
{
SetPlayerPos(playerid,2528.5593,-1666.6616,15.1681);
SendClientMessage(playerid,Grove_Gruen,"Benutze /th für Team-Infos!");
IsPlayerInTeam[playerid]=1;
}
else if(gTeam[playerid] == TEAM_BALLAS)
{
SetPlayerPos(playerid,1939.4319,-1115.5514,27.4523);
SendClientMessage(playerid,ballas_pink,"Benutze /th für Team-Infos!");
IsPlayerInTeam[playerid]=1;
}
else if(gTeam[playerid] == TEAM_COPS)
{
SetPlayerPos(playerid,1550.9686,-1675.8231,15.6435);
SendClientMessage(playerid,lspd_blau,"Benutze /th für Team-Infos!");
IsPlayerInTeam[playerid]=1;
}
else if(gTeam[playerid] == TEAM_FBI)
{
SetPlayerPos(playerid,1567.7510,-1697.7358,5.8906);
SendClientMessage(playerid,fbi_grau,"Benutze /th für Team-Infos!");
IsPlayerInTeam[playerid]=1;
}
else if(gTeam[playerid] == TEAM_VAGOS)
{
SetPlayerPos(playerid,2222.6016,-1335.4753,23.9844);
SendClientMessage(playerid,vagos_gelb,"Benutze /th für Team-Infos!");
IsPlayerInTeam[playerid]=1;
}
else if(gTeam[playerid] == TEAM_AZTECAS)
{
SetPlayerPos(playerid,2144.5708,-1803.0248,16.1406);
SendClientMessage(playerid,aztecas_rot,"Benutze /th für Team-Infos!");
IsPlayerInTeam[playerid]=1;
}
else if(gTeam[playerid] == TEAM_NOSTRA)
{
SetPlayerPos(playerid,1240.3864,-2035.3488,61.8419);
SendClientMessage(playerid,neon,"Benutze /th für Team-Infos!");
IsPlayerInTeam[playerid]=1;
}
else if(gTeam[playerid] == TEAM_ARMY)
{
SetPlayerPos(playerid,-3387.9390,915.3789,13.0513);
SendClientMessage(playerid,neon,"Benutze /th für Team-Infos!");
IsPlayerInTeam[playerid]=1;
}
else if(gTeam[playerid] == TEAM_ZIVILIST)
{
SetPlayerPos(playerid,-2679.3127,1349.2620,16.9978);
SetPlayerSkin(playerid, 19);
}
return 1;
}
//Darfs1Public
public Darfs1(playerid)
{
Darfs[playerid]=1;
return 1;
}
Funktion was eigentlich passieren soll...
Timer soll starten, nach 15Sekunden wird die Variable auf 1gesetzt und man hat dann somit die Erlaubnis zu spawnen...in den 15Sekunden soll die nachricht kommen man darf nicht spawnen wenn man auf spawn klickt...
Funktion was zur Zeit passiert...
Man connectet..klickt auf spawn...Nachricht kommt das man nicht spawnen darf...und man wird in Las Venturas an der Rolletreppe da gespawned...(standartspawn) glaub ich.
Also was ist an dem Code falsch ?
Mfg
Ed_Hardy