30.05.2012, 18:57
pawn Код:
CMD:givecar(playerid,params[])
{
new carid;
new id;
new string[128];
new Float:X, Float:Y, Float:Z, Float:angle;
if(sscanf(params,"ir",carid, id)) return SendClientMessage(playerid,-1,"Error: - /givecar [car id] [player id]"); // checking does sscanf found integer parameter
GetPlayerPos(id, X, Y, Z);
GetPlayerFacingAngle(id, angle);
CreateVehicle(carid, X, Y, Z, angle, 0, 1, 60);
PutPlayerInVehicle(id, carid, 0);
format(string, sizeof(string), "the admin has chose %s as the event car", GetPlayerVehicleID(playerid));
SendClientMessageToAll(string);
return 1;
}