SA-MP Forums Archive
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(playeridCOLOR_REDEventInfo[weaponEvent]);
            
GetPlayerName(playeridpnamesizeof(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(playeridpnamesizeof(pname));
            if(
listitem == 0){
                
ShowPlayerDialog(playerid785DIALOG_STYLE_INPUT"{0000FF}Weapon""Chose a weapon (put weapon id)","Ok","Close");
            }
            if(
listitem == 1){
                
ShowPlayerDialog(playerid786DIALOG_STYLE_INPUT"{0000FF}Weapon""Chose a weapon (put weapon id)","Ok","Close");
            }
            if(
listitem == 2){
                
ShowPlayerDialog(playerid789DIALOG_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(playeridparams[]){
    if(
EventInfo[eventStart] == 1){
         switch(
random(4)){
             case 
0SetPlayerPos(playerid596.0883,-489.4228,16.3359);
             case 
1SetPlayerPos(playerid752.3171,-497.8044,17.3281);
             case 
2SetPlayerPos(playerid696.3105,-645.9007,16.3359);
             case 
3SetPlayerPos(playerid612.8159,-610.9277,17.2266);
         }
        
GivePlayerWeapon(playeridEventInfo[weaponEvent], 2000);
          
SetPlayerArmour(playerid100);
          
SetPlayerVirtualWorld(playerid1);
        
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.