19.01.2013, 19:23
Quote:
did't work... ok now lets say I rcon admin and get in a car. how do I create the command /destroycar to destroy the car where I'm at (forget about all the coord and all that act like I haven never said that before )
|
pawn Код:
if(strcmp(cmdtext, "/destroycar", true) == 0)
{
if(!IsPlayerAdmin(playerid)) return 1;
new Float:X, Float:Y, Float:Z;
for(new i = 0; i < MAX_VEHICLES; i++)
{
GetVehiclePos(i, X, Y, Z);
if(IsPlayerInRangeOfPoint(playerid, 10.0, X, Y, Z))
{
DestroyVehicle(i);
}
}
return 1;
}