03.03.2011, 16:51
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/nrg1", cmdtext, true, 10) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2857.31,-1960.78,10.9376);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
LinkVehicleToInterior(GetPlayerVehicleID(playerid) , 0);
}
else
{
SetPlayerPos(playerid, 2857.31,-1960.78,10.9376);
SetPlayerFacingAngle(playerid, 0.0);
}
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, " Welcome to Nrg1!");
return 1;
}
return 0;
}
Use [pawn ] [/pawn ] for code.