ZCMD Little problem cmdtext
#1

-deleted-
Reply
#2

in ZCMD there is params[] option. use params insted of cmdtext.also use sscanf2 for better performance.
PHP код:
new giveplayerid[128];
    if(
sscanf(params"s"giveplayerid))
    {
        
SendClientMessage(playeridCOLOR_WHITE"USAGE: /id [playername]");
        return 
1;
    } 
just add
Код:
 #include sscanf2
at top. search on ****** for sscanf2 include for SAMP.
Reply
#3

Quote:
Originally Posted by GTLS
Посмотреть сообщение
in ZCMD there is params[] option. use params insted of cmdtext.also use sscanf2 for better performance.
PHP код:
new giveplayerid[128];
    if(
sscanf(params"s"giveplayerid))
    {
        
SendClientMessage(playeridCOLOR_WHITE"USAGE: /id [playername]");
        return 
1;
    } 
just add
Код:
 #include sscanf2
at top. search on ****** for sscanf2 include for SAMP.
Optimize it and it will give you SSCANF warning.
PHP код:
    new giveplayerid[MAX_PLAYER_NAME];
    if(
sscanf(params"s[24]"giveplayerid)) return SendClientMessage(playerid, -1"USAGE: /id [playername]"); 
By the way, you need to add this at the top of the script.
PHP код:
#include <sscanf2> 
Reply
#4

Just use params, it's already a string.
No need for sscanf when you only want to use a string.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)