PHP код:
new Carro[MAX_PLAYERS]
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/elegy", true))
{
new Float:dPos[4];
if(/*Variavel*/[playerid] != 1) return SendClientMessage(playerid, -1, "Vocк nгo й vip!");
GetPlayerPos(playerid, dPos[0], dPos[1], dPos[2]);
GetPlayerFacingAngle(playerid, dPos[3]);
DestroyVehicle(Carro[playerid]);
Carro[playerid] = CreateVehicle(562, dPos[0]+3, dPos[1], dPos[2]+1, dPos[3], random(127), random(127), -1);
PutPlayerInVehicle(playerid, Carro[playerid], 0);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(playerid));
return true;
}
return 0;
}
public OnPlayerDisconnect(playerid, reason)
{
DestroyVehicle(Carro[playerid]);
return 1;
}