16.06.2012, 12:59
hi, im making a admin system im currently making a /givecar the problem is i forgot how to get the players angle and put it in the createvehicle lol
i thought it was like this:
but i get a tag mismatch
i thought it was like this:
pawn Code:
CMD:givecar(playerid, params[])
{
new id;
new carid;
new string[128];
new string2[128];
new Float:X, Float:Y, Float:Z;
new angle;
if(sscanf(params,"ui",id,carid)) return SendClientMessage(playerid, -1, "USAGE: /givecar [id] [carid]");
format(string, sizeof(string),"%s has given you a vehicle(id: %d)", PlayerName(playerid), carid);
format(string2, sizeof(string2),"you have given %s a vehicle(id: %d",PlayerName(id), carid);
GetPlayerPos(id, X, Y, Z);
GetPlayerFacingAngle(id, angle);
CreateVehicle(carid, X, Y, Z, angle, 0, 1, -1);
SendClientMessage(id, -1, string);
SendClientMessage(playerid, -1, string2);
return 1;
}
but i get a tag mismatch