13.10.2009, 23:19
pawn Код:
new Spawned[MAX_PLAYERS];//global varible
pawn Код:
Spawned[playerid] = 0;// add under onplayerconnect
pawn Код:
if (strcmp("/nrg", cmdtext, true, 10) == 0)
{
if(Spawned[playerid] == 1)
{
SendClientMessage(playerid, yourcolor, " You already spawned a nrg500");
retrun 1;
}
new Float: X, Float: Y, Float: Z, Float: A;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,A);
new car = CreateVehicle(522,X,Y,Z,A,-1,-1,120000);
PutPlayerInVehicle(playerid,car,0);
Spawned[playerid] = 1;
return 1;
}