Inputtext problem. - 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: Inputtext problem. (
/showthread.php?tid=323888)
Inputtext problem. -
Bogdan1992 - 07.03.2012
Hello, here is my event maker. First of all i chose the type of event then the map after map i'll chose the weapon but i don't know why it doesn't work. Here you go. EventInfo[weaponEvent] should be the number introduced into the weapon chose dialog.
PHP код:
if(dialogid == 785){ // deathmatch zone
if(response){
strcat(EventInfo[weaponEvent], inputtext);
SendClientMessage(playerid, COLOR_RED, EventInfo[weaponEvent]);
GetPlayerName(playerid, pname, sizeof(pname));
SendClientMessageToAll(COLOR_BLUE, "An admin just started an deathmatch event [/join].");
EventInfo[eventStart] = 1;
}
return 1;
}
if(dialogid == 782){ // deathmatch zone
if(response){
GetPlayerName(playerid, pname, sizeof(pname));
if(listitem == 0){
ShowPlayerDialog(playerid, 785, DIALOG_STYLE_INPUT, "{0000FF}Weapon", "Chose a weapon (put weapon id)","Ok","Close");
}
if(listitem == 1){
ShowPlayerDialog(playerid, 786, DIALOG_STYLE_INPUT, "{0000FF}Weapon", "Chose a weapon (put weapon id)","Ok","Close");
}
if(listitem == 2){
ShowPlayerDialog(playerid, 789, DIALOG_STYLE_INPUT, "{0000FF}Weapon", "Chose a weapon (put weapon id)","Ok","Close");
}
return 1;
}
}
return 1;
}
And this is the join command.
PHP код:
CMD:join(playerid, params[]){
if(EventInfo[eventStart] == 1){
switch(random(4)){
case 0: SetPlayerPos(playerid, 596.0883,-489.4228,16.3359);
case 1: SetPlayerPos(playerid, 752.3171,-497.8044,17.3281);
case 2: SetPlayerPos(playerid, 696.3105,-645.9007,16.3359);
case 3: SetPlayerPos(playerid, 612.8159,-610.9277,17.2266);
}
GivePlayerWeapon(playerid, EventInfo[weaponEvent], 2000);
SetPlayerArmour(playerid, 100);
SetPlayerVirtualWorld(playerid, 1);
joinEvent[playerid] = 1;
}
return 1;
}
Re: Inputtext problem. -
Shabi RoxX - 07.03.2012
WTF, strcat ??
pawn Код:
strcat([B]EventInfo[weaponEvent][/B], inputtext);
Use this here:
pawn Код:
format(EventInfo[weaponEvent], sizeof(EventInfo[weaponEvent]), inputtext);
Re: Inputtext problem. -
Bogdan1992 - 07.03.2012
Still doesn't work.
Re: Inputtext problem. -
Shabi RoxX - 07.03.2012
So where the problem , In Dialog or /join cmd
?
Re: Inputtext problem. -
Bogdan1992 - 07.03.2012
In dialog, because it doesnt stores the number i type. It stores nothing, i tested with a message.
Re: Inputtext problem. -
Bogdan1992 - 07.03.2012
problem solved.