Help scripting
#1

Hi all I made a spawn with a menu and when I return his kick me

PHP код:
                }
               
// bla bla bla
            
}
        }
    }
    if(
dialogid == DIALOG_WEAPONS)
    {
        if(
response// If they clicked 'Select' or double-clicked a weapon
        
{
            
// Give them the weapon
            
switch(listitem)
            {
                case 
0GivePlayerWeapon(playeridWEAPON_DEAGLE14); // Give them a desert eagle
                
case 1GivePlayerWeapon(playeridWEAPON_AK47120); // Give them an AK-47
                
case 2GivePlayerWeapon(playeridWEAPON_SHOTGSPA28); // Give them a Combat Shotgun
            
}
        }
        return 
SendClientMessage(playerid,-1,""); // We handled a dialog, so return 1. Just like OnPlayerCommandText.
    
}
    return 
0;

Reply
#2

Do you use any anti cheat system?
Reply
#3

No I do not use

And sorry for my english
Reply
#4

Try this:

pawn Код:
if(dialogid == DIALOG_WEAPONS)
{
    if(!response) return 1;
    if(response) // If they clicked 'Select' or double-clicked a weapon
    {
        // Give them the weapon
        switch(listitem)
        {
            case 0: GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Give them a desert eagle
            case 1: GivePlayerWeapon(playerid, WEAPON_AK47, 120); // Give them an AK-47
            case 2: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28); // Give them a Combat Shotgun
        }
    }
    return SendClientMessage(playerid,-1,""); // We handled a dialog, so return 1. Just like OnPlayerCommandText.
}
Reply
#5

C:\Users\Yamaha\Desktop\Counter strike\gamemodes\cs - Copie.pwn(1146) : error 010: invalid function or declaration
C:\Users\Yamaha\Desktop\Counter strike\gamemodes\cs - Copie.pwn(1496) : warning 217: loose indentation
C:\Users\Yamaha\Desktop\Counter strike\gamemodes\cs - Copie.pwn(1496) : error 029: invalid expression, assumed zero
C:\Users\Yamaha\Desktop\Counter strike\gamemodes\cs - Copie.pwn(1496) : error 004: function "S@@_OnPlayerClickPlayer" is not implemented
C:\Users\Yamaha\Desktop\Counter strike\gamemodes\cs - Copie.pwn(1501) : error 030: compound statement not closed at the end of file (started at line 1410)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#6

Replace

pawn Код:
if(!response) return 1;
and

pawn Код:
if(response)
with

pawn Код:
if(!response)
{
       return 1;
}
else if(response)
This should work.
Reply
#7

I miss my gamemode

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch( 
dialogid )
    {
        case 
DIALOG_REGISTER:
        {
            if (!
response) return Kick(playerid);
            if(
response)
            {
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT""COL_WHITE"Connexion/Enregistrement",""COL_RED"Vous avez mis un MOT DE PASSE incorrecte.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_SetTag(File,"data");
                
INI_WriteInt(File,"Password",udb_hash(inputtext));
                
INI_WriteInt(File,"Cash",0);
                
INI_WriteInt(File,"Admin",0);
                
INI_WriteInt(File,"Kills",0);
                
INI_WriteInt(File,"Deaths",0);
                
INI_WriteInt(File,"Score",0);
                
INI_Close(File);
                
SetSpawnInfo(playerid001958.331343.1215.36269.15000000);
                
SpawnPlayer(playerid);
                
SendClientMessage(playerid,-1,"");
                
SendClientMessage(playerid,-1,"");
                
SendClientMessage(playerid,-1,"");
                
SendClientMessage(playerid,-1,"");
                
SendClientMessage(playerid,-1,"");
                
SendClientMessage(playerid,-1,"");
                
SendClientMessage(playerid,-1,"");
                
SendClientMessage(playerid,-1,"");
                
SendClientMessage(playerid,-1,"");
                
SendClientMessage(playerid,-1,"");
                
SendClientMessage(playerid,-1,"");
                
SendClientMessage(playerid,-1,"");
                
SendClientMessage(playerid,0xCD7D05FF,"Merci d'avoir crйer un {0080C0}compte sur notre serveur.");
                
SendClientMessage(playerid,0xCD7D05FF,"Votre {FF0000}PSEUDO {CD7D05}est votre {FF0000}MOT DE PASSE {CD7D05}sont enregistrer.");
                
SendClientMessage(playerid,0xCD7D05FF,"Bon jeux parmis nous.");
                 
GivePlayerMoney(playerid1000);
             }
        }
        case 
DIALOG_LOGIN:
        {
            if ( !
response ) return Kick playerid );
            if( 
response )
            {
                if(
udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
                    
GivePlayerMoney(playeridPlayerInfo[playerid][pCash]);
                    
SendClientMessage(playerid,-1,"");
                     
SendClientMessage(playerid,-1,"");
                    
SendClientMessage(playerid,-1,"");
                    
SendClientMessage(playerid,-1,"");
                    
SendClientMessage(playerid,-1,"");
                    
SendClientMessage(playerid,-1,"");
                    
SendClientMessage(playerid,-1,"");
                    
SendClientMessage(playerid,-1,"");
                    
SendClientMessage(playerid,-1,"");
                    
SendClientMessage(playerid,-1,"");
                    
SendClientMessage(playerid,-1,"");
                    
SendClientMessage(playerid,-1,"");
                    
SendClientMessage(playerid,0xCD7D05FF,"Vos stats ont йtй charger avec {004000}succйs !.");
                }
                else
                {
                    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Vous avez mis un MOT DE PASSE incorrecte.\n"COL_WHITE"Merci de mettre votre MOT DE PASSE.","Identifier","Quitter");
                }
     }
     return 
0
Help me
Reply
#8

Pleases help me how to make ?
Reply
#9

Up :/
Reply
#10

Hi have anti spawn kill is problиme ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)