27.08.2012, 22:36
This is the code and It will not move the car into the air. Should I not use GetVehiclePos and SetVehiclePos?
pawn Код:
CMD:vslap(playerid, params[])
{
new targetid, Float:x, Float:y, height, Float:z, string[128];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Only Administrators have access to this command");
if(sscanf(params, "ui",targetid, height)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vslap [id] [height]");
if(targetid != INVALID_PLAYER_ID)
{
GetVehiclePos(targetid, x, y, z);
SetVehiclePos(targetid, x, y, z+ height);
format(string, sizeof(string),"Administrator %s has slapped your vehicle %d feet high",pName(playerid), height);
SendClientMessage(targetid,COLOR_RED,string);
format(string, sizeof(string),"You have slapped %s's vehicle %d feet high",pName(targetid), height);
SendClientMessage(playerid,COLOR_RED,string);
}
return 1;
}