warnings
#2

you must format a string BEFORE you use it in SendClientMessage

you cannot use SendClientMessage to format anything.

pawn Code:
CMD:givecar(playerid,params[])
{
    new vehid;
    new id,str[50];
    new Float:X, Float:Y, Float:Z, Float:angle;
    if(sscanf(params,"du",vehid, id)) return SendClientMessage(playerid,-1,"Error: - /givecar [vehid] [player id]");
    GetPlayerPos(id, X, Y, Z);
    GetPlayerFacingAngle(id, angle);
    CreateVehicle(vehid, X, Y, Z, angle, 0, 1, -1);
    PutPlayerInVehicle(id, vehid, 0);
    format(str,sizeof(str),"%s has given you a vehicle", GetPlayerName(playerid));
    SendClientMessage(playerid, -1, str);
    return 1;
}
Reply


Messages In This Thread
warnings - by thefatshizms - 06.06.2012, 16:36
Re: warnings - by Jonny5 - 06.06.2012, 16:52
Re: warnings - by thefatshizms - 06.06.2012, 16:59
Re: warnings - by Jonny5 - 06.06.2012, 17:10
Re: warnings - by thefatshizms - 06.06.2012, 17:23
Re: warnings - by Jonny5 - 06.06.2012, 17:25
Re: warnings - by MadeMan - 06.06.2012, 17:28
Re: warnings - by Jonny5 - 06.06.2012, 17:31
Re: warnings - by thefatshizms - 06.06.2012, 17:44
Re: warnings - by Faisal_khan - 06.06.2012, 17:49
Re: warnings - by thefatshizms - 06.06.2012, 17:55
Re: warnings - by Faisal_khan - 06.06.2012, 18:04

Forum Jump:


Users browsing this thread: 1 Guest(s)