ID Problem - 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: ID Problem (
/showthread.php?tid=410903)
ID Problem -
IgrexolonO - 27.01.2013
Hey. I have problem with sscanf.
Код:
dcmd_aget(playerid, params[])
{
new id, choose[8];
sscanf(params, "is", id, choose);
if(!strlen(params)) return SendClientMessage(playerid, 0, "Użycie: /aget [id] [opcja]");
printf("%i guwno", id);
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0, "Nie znaleziono gracza.");
It's only a part of code but id gives me 101 when I type 1. Why is it?
Re: ID Problem -
Da_Noob - 27.01.2013
Try: sscanf(params, "us", id, choose);
Re: ID Problem -
IgrexolonO - 27.01.2013
Ok. Lock please ^^ Fixed. Setted choose size to 11.