TextDraw String commands doesn't respond
#1

PHP код:
new TeamBScore;
new 
TeamAScore;
new 
Text:TeamB;
new 
Text:TeamA;
if(
strcmp(cmdtext,"/SetScoreA"true) == 0){
     new 
newtext[41],tmp[256];
    
TeamAScore strval(tmp);
    if(!
strlen(tmp)) return SendClientMessage(playerid, -1"Usage: /SetScoreA [Score]");
    
format(newtextsizeof(newtext), "Team A Score: %d"TeamAScore), TextDrawSetString(TeamAnewtext);
    
TextDrawShowForPlayer(playerid,TeamA);
    return 
1;}
if(
strcmp(cmdtext,"/SetScoreB"true) == 0){
     new 
newtext[41],tmp[256];
    
TeamBScore strval(tmp);
    if(!
strlen(tmp)) return SendClientMessage(playerid, -1"Usage: /SetScoreB [Score]");
    
format(newtextsizeof(newtext), "Team B Score: %d"TeamBScore), TextDrawSetString(TeamBnewtext);
    
TextDrawShowForPlayer(playerid,TeamB);
    return 
1;} 
Explanation:
When I'll use the command /SetScoreA or /SetScoreB The "Usage" text will show and guide me how to change the value of points in TeamA or TeamB.
When I compiled the file the pawn gave no errors but when I tested it only the usage text works but when I enter a value it doesn't respond and replies that the command is unknown.

I hope you guys will help me as soon as possible.
Reply
#2

Use ZCMD, strcmp is so shitty.
Reply
#3

Quote:
Originally Posted by Sithis
Посмотреть сообщение
Use ZCMD, strcmp is so shitty.
I would like to correct you on that, Strcmp is not shitty, it is the Pawno Default code. Everything your playing in with the new updates most of has been coded in strcmp. Default codes are always the best.

Many people dont use strcmp because they do not know how to code it, or it is to hard for them

ZCMD is just simple

line
line
line
No indents intended


You also need to catch a result, im not seeing it in there
Reply
#4

I don't know how to use ZCMD, can you build the commands based on this include?

Quote:

You also need to catch a result, im not seeing it in there

The result is the format which will change the %d to a number which I want to choose, it will quickly hide and
show the specific textdraw with the value that i have chosen to use.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)