TextDraw String commands doesn't respond - 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: TextDraw String commands doesn't respond (
/showthread.php?tid=433006)
TextDraw String commands doesn't respond -
eldar7393 - 25.04.2013
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(newtext, sizeof(newtext), "Team A Score: %d", TeamAScore), TextDrawSetString(TeamA, newtext);
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(newtext, sizeof(newtext), "Team B Score: %d", TeamBScore), TextDrawSetString(TeamB, newtext);
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.
Re: TextDraw String commands doesn't respond -
Sithis - 25.04.2013
Use ZCMD, strcmp is so shitty.
Re: TextDraw String commands doesn't respond -
Ciandlah - 25.04.2013
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
Re: TextDraw String commands doesn't respond -
eldar7393 - 25.04.2013
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.