[HELP] Class script
#6

Though this is all you need
PHP код:
#include <a_samp>
public OnPlayerCommandText(playeridcmdtext[]) // if a player writes command
{
    if (
strcmp("/police"cmdtexttrue7) == 0// if a player writes /police
    
{
        
GivePlayerWeapon(playerid2210000);
        
GivePlayerWeapon(playerid31);
        
GivePlayerWeapon(playerid2210000);
        
GivePlayerWeapon(playerid4110000);
        return 
1;
    }
    if (
strcmp("/swat"cmdtexttrue5) == 0// if a player writes /swat
    
{
        
GivePlayerWeapon(playerid3110000);
        
GivePlayerWeapon(playerid2710000);
        
GivePlayerWeapon(playerid2410000);
        
GivePlayerWeapon(playerid1710000);
        return 
1;
    }
    if (
strcmp("/ff"cmdtexttrue3) == 0// if a player writes /ff
    
{
        
GivePlayerWeapon(playerid4210000);
        return 
1;
    }
    if (
strcmp("/whore"cmdtexttrue6) == 0// if a player writes /whore
    
{
        
GivePlayerWeapon(playerid101);
        
GivePlayerWeapon(playerid111);
        
GivePlayerWeapon(playerid121);
        
GivePlayerWeapon(playerid131);
        return 
1;
    }
    if (
strcmp("/hitman"cmdtexttrue7) == 0// if a player writes /hitman
    
{
        
GivePlayerWeapon(playerid3410000);
        return 
1;
    }
    if (
strcmp("/terrorist"cmdtexttrue10) == 0// if a player writes /terrorist
    
{
        
GivePlayerWeapon(playerid3510000);
        
GivePlayerWeapon(playerid81);
        
GivePlayerWeapon(playerid3010000);
        return 
1;
    }
    if (
strcmp("/maniac"cmdtexttrue7) == 0// if a player writes /maniac
    
{
        
GivePlayerWeapon(playerid910000);
        return 
1;
    }
    if (
strcmp("/photographer"cmdtexttrue13) == 0// if a player writes /photographer
    
{
        
GivePlayerWeapon(playerid4310000);
        return 
1;
    }    
    return 
0;
// we ended this callback's functions. 
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)