- 0
Problema cu strcat
-
Similar Content
-
- 2 replies
- 74 views
-
- 7 answers
- 566 views
-
- 2 answers
- 103 views
-
- 2 answers
- 154 views
-
- 3 answers
- 143 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Punct.
Nick: Punct.
Problema: Am facut niste textdraw-uri.. mai exact butoane pe care scrie A, B, C, D. Cand dai click pe ele sa se formeze alt textdraw si sa apara un cuvant format din ordonea in care apesi pe textdraw-uri A,B,C,D. Problema e ca mie imi facem mereu textdraw-ul litera pe care apas.. in loc sa mai adauge litera pe care apas la cuvantul care ar trebui sa se formeze.
Erori / warnings: -
Lini/script:
[pawn]
if (strcmp(cmd, "/test", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new t; t != sizeof(Login); ++t)
{
PlayerTextDrawShow(playerid, Login[t][playerid]);
}
opcptd[playerid] = 4;
SelectTextDraw(playerid, 0x00FF00FF);
}
return 1;
}
[/pawn]
[pawn]
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(opcptd[playerid] == 1) {//...}
else if(opcptd[playerid] == 2) {//...}
else if(opcptd[playerid] == 3) {//...}
else if(opcptd[playerid] == 4)
{
new string[50], std[50];
if(playertextid == Login[0][playerid])
{
strcat(string, "A");
format(std, sizeof(std), "%s", string);
PlayerTextDrawSetString(playerid, Login[4][playerid], string);
PlayerTextDrawShow(playerid, Login[4][playerid]);
}
else if(playertextid == Login[1][playerid])
{
strcat(string, "B");
format(std, sizeof(std), "%s", string);
PlayerTextDrawSetString(playerid, Login[4][playerid], string);
PlayerTextDrawShow(playerid, Login[4][playerid]);
}
else if(playertextid == Login[2][playerid])
{
strcat(string, "C");
format(std, sizeof(std), "%s", string);
PlayerTextDrawSetString(playerid, Login[4][playerid], string);
PlayerTextDrawShow(playerid, Login[4][playerid]);
}
else if(playertextid == Login[3][playerid])
{
strcat(string, "D");
format(std, sizeof(std), "%s", string);
PlayerTextDrawSetString(playerid, Login[4][playerid], string);
PlayerTextDrawShow(playerid, Login[4][playerid]);
CancelSelectTextDraw(playerid);
}
}
return 1;
}
[/pawn]
[pawn]
Login[0][playerid] = CreatePlayerTextDraw(playerid, 27.000000, 114.000000, "A");
PlayerTextDrawAlignment(playerid, Login[0][playerid], 2);
PlayerTextDrawBackgroundColor(playerid, Login[0][playerid], 255);
PlayerTextDrawFont(playerid, Login[0][playerid], 1);
PlayerTextDrawLetterSize(playerid, Login[0][playerid], 0.500000, 1.000000);
PlayerTextDrawColor(playerid, Login[0][playerid], -1);
PlayerTextDrawSetOutline(playerid, Login[0][playerid], 0);
PlayerTextDrawSetProportional(playerid, Login[0][playerid], 1);
PlayerTextDrawSetShadow(playerid, Login[0][playerid], 1);
PlayerTextDrawUseBox(playerid, Login[0][playerid], 1);
PlayerTextDrawBoxColor(playerid, Login[0][playerid], 255);
PlayerTextDrawTextSize(playerid, Login[0][playerid], 13.000000, 14.000000);
PlayerTextDrawSetSelectable(playerid, Login[0][playerid], 1);
Login[1][playerid] = CreatePlayerTextDraw(playerid, 47.000000, 114.000000, "B");
PlayerTextDrawAlignment(playerid, Login[1][playerid], 2);
PlayerTextDrawBackgroundColor(playerid, Login[1][playerid], 255);
PlayerTextDrawFont(playerid, Login[1][playerid], 1);
PlayerTextDrawLetterSize(playerid, Login[1][playerid], 0.500000, 1.000000);
PlayerTextDrawColor(playerid, Login[1][playerid], -1);
PlayerTextDrawSetOutline(playerid, Login[1][playerid], 0);
PlayerTextDrawSetProportional(playerid, Login[1][playerid], 1);
PlayerTextDrawSetShadow(playerid, Login[1][playerid], 1);
PlayerTextDrawUseBox(playerid, Login[1][playerid], 1);
PlayerTextDrawBoxColor(playerid, Login[1][playerid], 255);
PlayerTextDrawTextSize(playerid, Login[1][playerid], 13.000000, 14.000000);
PlayerTextDrawSetSelectable(playerid, Login[1][playerid], 1);
Login[2][playerid] = CreatePlayerTextDraw(playerid, 67.000000, 114.000000, "C");
PlayerTextDrawAlignment(playerid, Login[2][playerid], 2);
PlayerTextDrawBackgroundColor(playerid, Login[2][playerid], 255);
PlayerTextDrawFont(playerid, Login[2][playerid], 1);
PlayerTextDrawLetterSize(playerid, Login[2][playerid], 0.500000, 1.000000);
PlayerTextDrawColor(playerid, Login[2][playerid], -1);
PlayerTextDrawSetOutline(playerid, Login[2][playerid], 0);
PlayerTextDrawSetProportional(playerid, Login[2][playerid], 1);
PlayerTextDrawSetShadow(playerid, Login[2][playerid], 1);
PlayerTextDrawUseBox(playerid, Login[2][playerid], 1);
PlayerTextDrawBoxColor(playerid, Login[2][playerid], 255);
PlayerTextDrawTextSize(playerid, Login[2][playerid], 13.000000, 14.000000);
PlayerTextDrawSetSelectable(playerid, Login[2][playerid], 1);
Login[3][playerid] = CreatePlayerTextDraw(playerid, 87.000000, 114.000000, "D");
PlayerTextDrawAlignment(playerid, Login[3][playerid], 2);
PlayerTextDrawBackgroundColor(playerid, Login[3][playerid], 255);
PlayerTextDrawFont(playerid, Login[3][playerid], 1);
PlayerTextDrawLetterSize(playerid, Login[3][playerid], 0.500000, 1.000000);
PlayerTextDrawColor(playerid, Login[3][playerid], -1);
PlayerTextDrawSetOutline(playerid, Login[3][playerid], 0);
PlayerTextDrawSetProportional(playerid, Login[3][playerid], 1);
PlayerTextDrawSetShadow(playerid, Login[3][playerid], 1);
PlayerTextDrawUseBox(playerid, Login[3][playerid], 1);
PlayerTextDrawBoxColor(playerid, Login[3][playerid], 255);
PlayerTextDrawTextSize(playerid, Login[3][playerid], 13.000000, 14.000000);
PlayerTextDrawSetSelectable(playerid, Login[3][playerid], 1);
Login[4][playerid] = CreatePlayerTextDraw(playerid, 57.000000, 130.000000, "i");
PlayerTextDrawAlignment(playerid, Login[4][playerid], 2);
PlayerTextDrawBackgroundColor(playerid, Login[4][playerid], 255);
PlayerTextDrawFont(playerid, Login[4][playerid], 1);
PlayerTextDrawLetterSize(playerid, Login[4][playerid], 0.500000, 1.000000);
PlayerTextDrawColor(playerid, Login[4][playerid], -1);
PlayerTextDrawSetOutline(playerid, Login[4][playerid], 0);
PlayerTextDrawSetProportional(playerid, Login[4][playerid], 1);
PlayerTextDrawSetShadow(playerid, Login[4][playerid], 1);
PlayerTextDrawUseBox(playerid, Login[4][playerid], 1);
PlayerTextDrawBoxColor(playerid, Login[4][playerid], -205);
PlayerTextDrawTextSize(playerid, Login[4][playerid], 0.000000, 76.000000);
[/pawn]
Ai incercat sa rezolvi singur ?: Da.. am tot invartit string, std de la OnPlayerClickPlayerTextDraw.. dar mai mult m-am ametit.. :|
Cateva poze.. desi nu cred ca ajuta: http://imgur.com/a/tJWOK#0
Nu mai deschideti in pu*a mea servere de SA:MP !
Jucati-va pe cele care sunt ! Sunt suficiente !
Reguli de bun simt:
My work
:::http://pastebin.com/VRNRcaAsLink to comment
Share on other sites
4 answers to this question
Recommended Posts