/pay Command not working

Hi, i'm a beginner scripter.
i need help with my new /pay cmd, not working.
the code is:
pawn Код:
if(!strcmp(cmdtext, "/p ", true, 2) && (cmdtext[2] == '\0' || cmdtext[2] == ' '))// /p parancs, fizetйs
    if(!cmdtext[2] || !cmdtext[3]) return SendClientMessage(playerid, 0xFF0000FF, "Fizetйs. Hasznбlat: /p [ID] [цsszeg]");
 new fizetseg[128];
 format(fizetseg,128,"Adtбl %d FT-t %d-nek", cmdtext[4], cmdtext[2]);
The problem is, that it gets -32 from my money, and it types : Adtбl 32FT-t 32-nek ( You gave 32ft to 32).. if i type /p 8 1000, it says that too,. anyone help?

Sorry for little offtopic but i will recommend you to use zcmd and sscanf, that would be much much easier.

So, is that impossible this way? Because i wanna use only the a_samp.

Maybe it is possible, i don't know cuz im not using this system.

I don't know how you are goin to make your systems without sscanf, its kinda impossible

Like you are just making things harder for you, zcmd and sscanf would help you a lot

you can use strtok but it's too old, it's outdated


Indeed, I suggest you to use zCMD. Strcmp has many bugs in 0.3x.

Originally Posted by Aarab
Посмотреть сообщение
Indeed, I suggest you to use zCMD. Strcmp has many bugs in 0.3x.
strcmp is working fine and in the first place, it's used for comparing 2 strings not for commands.

However, I'll agree that using ZCMD or y_commands with sscanf is MUCH better/faster while strcmp and strtok are really bad/slow.

Forum Jump:

Users browsing this thread: 1 Guest(s)