SA-MP Forums Archive
forgotten :D - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: forgotten :D (/showthread.php?tid=351511)



forgotten :D - thefatshizms - 16.06.2012

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:
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


Re: forgotten :D - iggy1 - 16.06.2012

pawn Code:
new Float:angle;
Angle is a float.


Re: forgotten :D - thefatshizms - 16.06.2012

ah yes thanks now i remember +reped