19.03.2010, 07:48
pawn Код:
public OnPlayerUpdate(playerid)
{
new Float:x;
new Float:y;
new Float:z;
GetPlayerPos(playerid, x, y, z);
if(z == 0)
{
new iRandom = random(sizeof(SumoRandCars));
new iRandColors = random(sizeof(SumoRandColors));
new VehID[256];
VehID[playerid] = CreateVehicle(SumoRandCars[iRandom][0], 4117.751953125,-1185.1917724609,22,270.27026367188,SumoRandColors[iRandColors][0],SumoRandColors[iRandColors][0], 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999);
PutPlayerInVehicle(playerid, VehID[playerid], 0);
SendClientMessageToAll(GREEN, "[Respawn] Has Been Respawned![Reason: Fell Off]");
}
return 1;
}
1. Why are you making the respawn delay so long, use -1 and it won't respawn.
2. Your code is very inefficient, especially in OnPlayerUpdate this is some bad code....