Help with inputtext - 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: Help with inputtext (
/showthread.php?tid=488301)
Help with inputtext -
skydux123 - 17.01.2014
Hello:
PHP код:
if(dialogid == SpalvuDialog1)
{
if(response)
{
new giveplayerid;
if ( sscanf( inputtext, "r", giveplayerid ) ) ShowPlayerDialog(playerid, SpalvuDialog1, DIALOG_STYLE_INPUT, "Spalva: Raudona", "Čia įraљykite ћaidėjo nick arba ID\nNorėdamas jam pakeisti spalva", "Gerai", "");
else if(giveplayerid != INVALID_PLAYER_ID ) return SendClientMessage(playerid, COLOR_DRED, "[iRoam.LT]» Neteisingai nurodytas ћaidėjo ID, arba jo nėra prisijungusio!");
else
{
new rspalva[50];
strcpy(rspalva, inputtext, sizeof(rspalva));
SetPlayerColor(sizeof(rspalva), 0xFF0000FF);
}
}
return 1;
}
What I do bad in this code?
Re: Help with inputtext -
Vince - 17.01.2014
You need to use 'giveplayerid' as input for SetPlayerColor ...
Re: Help with inputtext -
skydux123 - 17.01.2014
But server sends me a message: Who is in this line:
else if(giveplayerid != INVALID_PLAYER_ID ) return SendClientMessage(playerid, COLOR_DRED, "[iRoam.LT]» Neteisingai nurodytas žaidėjo ID, arba jo nėra prisijungusio!");
Re: Help with inputtext -
Konstantinos - 17.01.2014
Saying the problem and also translating the messages would help the users (included me) to understand what's the problem and help you. I had to use ****** translate..
pawn Код:
if (dialogid == SpalvuDialog1)
{
if (response)
{
new
giveplayerid;
if (sscanf(inputtext, "r", giveplayerid)) return ShowPlayerDialog(playerid, SpalvuDialog1, DIALOG_STYLE_INPUT, "Spalva: Raudona", "Čia įrašykite žaidėjo nick arba ID\nNorėdamas jam pakeisti spalva", "Gerai", "");
if (giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_DRED, "[iRoam.LT]» Neteisingai nurodytas žaidėjo ID, arba jo nėra prisijungusio!");
SetPlayerColor(giveplayerid, 0xFF0000FF);
}
return 1;
}