SA-MP Forums Archive
hi all - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: hi all (/showthread.php?tid=83878)



hi all - Serediucr - 27.06.2009

hi all , i have a problem !
i maked a sumo ring!
i scripted it so the player when falls off , he dies and car respawns!!!
but this only works for id 0 !!!!
my code :
pawn Код:
//up
static bool:sumo[MAX_PLAYERS];
forward Sumo(playerid);
//onplayerdeath
sumo[playerid] = false;
//---in /kill cmd
sumo[playerid] = false;
//----- teleport to sumo ring cmd
sumo[playerid] = true;
SetTimer("Sumo",1000,1);
//down
public Sumo(playerid)
{
if(sumo[playerid])
    {
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(Z<123.372597){
new car = GetPlayerVehicleID(playerid);
SetVehicleToRespawn(car);
SetPlayerHealth(playerid, 0.0);
GameTextForPlayer(playerid, "You Failed!", 5000, 3);
}
return 1;
    }
return 1;
}
plz help soon!
you know i'm "the triple-post man"


Re: hi all - Grim_ - 27.06.2009

pawn Код:
//teleport to sumo ring command
SetTimerEx("Sumo", 1000, 1, "i", playerid);



Re: hi all - Serediucr - 27.06.2009

Quote:
Originally Posted by Swift_
pawn Код:
//teleport to sumo ring command
SetTimerEx("Sumo", 1000, 1, "i", playerid);
swift is the beeest!!! yes!it works