How I do this?
#1

here screenshot

tnx for helper
Reply
#2

https://sampwiki.blast.hk/wiki/Format
Reply
#3

but how?
here is my code
PHP код:
    if(!strcmp(cmd,"/id",true)){
    if(
playerid => && playerid <10) return format(string,sizeof(string),"00%d",playerid),SendClientMessage(playerid,COLOR_RED,string);
    if(
playerid =>10 && playerid <100) return format(string,sizeof(string),"0%d",playerid),SendClientMessage(playerid,COLOR_RED,string);
     if(
playerid =>100) return format(string,sizeof(string),"%d",playerid),SendClientMessage(playerid,COLOR_RED,string);
    return 
1;
    } 
Reply
#4

pawn Код:
if(!strcmp(cmd, "/id", true))
{
    format(string, sizeof(string), "%03d", playerid);
    SendClientMessage(playerid, COLOR_RED, string);
    return 1;
}
Reply
#5

tnx!
Reply
#6

Quote:
Originally Posted by YossiBz
Посмотреть сообщение
tnx!
I just realized that there was no need for the switch statement there. So I edited my post with the "fixed" code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)