03.05.2011, 16:34
pawn Code:
if (strcmp("/NRG", cmdtext, true) == 0)
{
if (PlayerInfo[playerid][pDonateRank] >= 3)
{
if(GetTickCount() - GetPVarInt(playerid, "LastNRG") < 120000) return SendClientMessage(playerid, 0xFF0000FF, "You have to wait 2 minutes before spawning new NRG");
new Float:X,Float:Y,Float:Z,Float:Angle, carid;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
carid = GetPlayerVehicleID(playerid);
carid = CreateVehicle(522,X,Y,Z,Angle,-1,-1,600);
PutPlayerInVehicle(playerid,carid,0);
TogglePlayerControllable(playerid,true);
SetPVarInt(playerid, "LastNRG", GetTickCount());
return SendClientMessage(playerid, 0x40FF40FF, "NRG has been spawned!");
}
return 1;
}