[HELP] Class script
#5

Your brackets are all messed up. Make sure your { and } brackets are around the correct code after checking the commands.
Also, don't forget to return 1; inside all of the successful commands so that the script can end right there and doesn't have to continue.

PHP код:
public OnPlayerCommandText(playeridcmdtext[]) // if a player writes a command
// callback starts.
        //< ... other commands ... >
        
if (strcmp("/terrorist"cmdtexttrue10) == 0//if the command is /terrorist then do this:
        
//bracket starts above code, after check
                
GivePlayerWeapon(playerid3510000);
                
GivePlayerWeapon(playerid81);
                
GivePlayerWeapon(playerid3010000);
                return 
1;  //command was successful and your script can end here
        
//bracket ends after the code, command /terrorist ends here
        //< ... other commands ... >
        
return 0//search for commands ends, no command found
//callback ends. 
Do this for the rest of the commands.
Reply


Messages In This Thread
[HELP] Class script - by dudejohn12 - 01.03.2018, 17:47
Re: [HELP] Class script - by AroseKhanNiazi - 01.03.2018, 21:56
Re: [HELP] Class script - by dudejohn12 - 01.03.2018, 23:11
Re: [HELP] Class script - by AroseKhanNiazi - 01.03.2018, 23:23
Re: [HELP] Class script - by AdamsLT - 01.03.2018, 23:24
Re: [HELP] Class script - by AroseKhanNiazi - 01.03.2018, 23:33
Re: [HELP] Class script - by dudejohn12 - 01.03.2018, 23:38

Forum Jump:


Users browsing this thread: 1 Guest(s)