Messing around with formats - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Messing around with formats (
/showthread.php?tid=248160)
Messing around with formats -
Seven_of_Nine - 12.04.2011
How do I convert "id" to be 'compatible' with playerid?
because I get a warning.. :\
Re: Messing around with formats - Max_Coldheart - 12.04.2011
could you be more specific about what you mean?
Re: Messing around with formats -
Seven_of_Nine - 12.04.2011
pawn Код:
COMMAND:troll(playerid)
new id;
if (playerid = id) {
....
}
like this :d
Re: Messing around with formats -
Jochemd - 12.04.2011
I don't understand you... For command processing use ZCMD (yeah you do) with sscanf (for params).
Btw, when checking, you need to have two of these '='
Re: Messing around with formats -
iJumbo - 12.04.2011
Some like this?
pawn Код:
COMMAND:troll(playerid,params[])
{
new id,string[128];
if(sscanf(params, "u", id)) return SendClientMessage(playerid, RED, "USO: /TROLL [ID]");
if (id == playerid) return SendClientMessage(playerid, RED, "Id its you!");
format(string,sizeof(string),"Id selected is %d",id);
SendClientMessage(playerid, RED, string);
return 1;
}
Re: Messing around with formats -
Seven_of_Nine - 12.04.2011
exactly

Thanks :]
Re: Messing around with formats -
iJumbo - 12.04.2011
np