Inputtext problem.
#1

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;

Reply
#2

WTF, strcat ??

pawn Код:
strcat([B]EventInfo[weaponEvent][/B], inputtext);
Use this here:
pawn Код:
format(EventInfo[weaponEvent], sizeof(EventInfo[weaponEvent]), inputtext);
Reply
#3

Still doesn't work.
Reply
#4

So where the problem , In Dialog or /join cmd ?
Reply
#5

In dialog, because it doesnt stores the number i type. It stores nothing, i tested with a message.
Reply
#6

problem solved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)