HELP REP++++++++++
#6

Quote:
Originally Posted by Don_Cage
Посмотреть сообщение
Just do
pawn Код:
if(!strcmp(cmdtext,"/command", true))
Here i did but its not working again e.e

PHP код:

public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/changeclass"cmdtexttrue))
    {
     
SPD(playerid,3,DSL,"{FFFFFF}Change your class","Sniper     ~    20 Kills\nEnginner     ~    100 Kills\nSoldier     ~    50 Kills\nRookie     ~    0 Kills","Select","Exit");
    return 
1;
    }
    if (
strcmp("/changeteam"cmdtexttrue))
    {
     
SPD(playerid,5,DSL,"{FFFFFF}Select your team","{0000FF}Ukraine\n{FF0000}Russia","Select","");
    return 
1;
    }
    if (
strcmp("/kill"cmdtexttrue))
    {
        
SetPlayerHealth(playerid,0);
        return 
1;
    }
    if (
strcmp("/armour"cmdtexttrue))
    {
        if(
GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid,0xAA3333AA"[SERVER]:You need 10000$ to use this command");
        
GivePlayerMoney(playerid,-10000);
        
SetPlayerArmour(playerid,100);
        
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You have been armoured 10000$ have been taken from your account.");
        return 
1;
    }
    if (
strcmp("/health"cmdtexttrue))
    {
        if(
GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid,0xAA3333AA"[SERVER]:You need 10000$ to use this command");
        
GivePlayerMoney(playerid,-10000);
        
SetPlayerHealth(playerid,100);
        
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You have been healed 10000$ have been taken from your account.");
        return 
1;
    }
    if (
strcmp("/clearanims"cmdtexttrue))
    {
        
ClearAnimations(playerid);
        return 
1;
    }
    if (
strcmp("/dance"cmdtexttrue))
    {
        
SetPlayerSpecialAction(playerid5);
        
SendClientMessage(playeridCOLOR_YELLOW "[SERVER]:You are dancing.");
        return 
1;
    }
    if (
strcmp("/handsup"cmdtexttrue))
    {
        
SetPlayerSpecialAction(playerid10);
        
SendClientMessage(playeridCOLOR_YELLOW "[SERVER]:Your hands are up.");
        return 
1;
    }
    if (
strcmp("/jetpack"cmdtexttrue))
    {
         if(
Player[playerid][pAdmin] >= 1)
        {
            
SetPlayerSpecialAction(playerid2);
            
SendClientMessage(playeridCOLOR_YELLOW "[SERVER]:JetPack spawned.");
        }
        else
        {
            
SendClientMessage(playerid,COLOR_RED,"[SERVER]:You are not allowed to use this command.");
        }
        return 
1;
    }
    if (
strcmp("/night"cmdtexttrue))
    {
        
SetPlayerTime(playerid,23,50);
        return 
1;
    }
    if (
strcmp("/day"cmdtexttrue))
    {
        
SetPlayerTime(playerid,6,55);
        return 
1;
    }
    if (
strcmp("/ep"cmdtexttrue))
    {
        
GivePlayerWeapon(playerid461);
        
SendClientMessage(playeridCOLOR_YELLOW "[SERVER]:Emergency Parachute spawned");
        return 
1;
    }
    if (
strcmp("/adminrefill"cmdtexttrue))
    {
        if(
Player[playerid][pAdmin] >= 1)
        {
         
SetPlayerHealth(playerid100);
        
SetPlayerArmour(playerid100);
        
SendClientMessage(playeridCOLOR_YELLOW "[SERVER]:You restored your health and armour");
        }
        else
        {
        
SendClientMessage(playeridCOLOR_YELLOW "[SERVER]:You are not allowed to use this command");
        }
        return 
1;
    }
    if (
strcmp("/onduty"cmdtexttrue))
    {
        if(
Player[playerid][pAdmin] >= 1)
        {
         
SetPlayerHealth(playerid999999);
        
SetPlayerArmour(playerid999999);
        
SendClientMessage(playeridCOLOR_YELLOW "[SERVER]:You are now admin onduty");
        
SetPlayerColor(playeridCOLOR_PINK);
        
SetPlayerSkin(playerid217);
        
GivePlayerWeapon(playerid38 999999);
        }
        else
        {
        
SendClientMessage(playeridCOLOR_RED "[SERVER]:You are not allowed to use this command");
        }
        return 
1;
    }
    if (
strcmp("/ukrainebase"cmdtexttrue))
    {
        if(
Player[playerid][pAdmin] >= 1)
        {
        
SetPlayerPos(playerid,-250.8406,2598.8433,62.8582);
        
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You teleported to Ukraine Base");
        }
        else
        {
        
SendClientMessage(playeridCOLOR_RED "[SERVER]:You are not allowed to use this command");
        }
        return 
1;
    }
    if (
strcmp("/russiabase"cmdtexttrue))
    {
        if(
Player[playerid][pAdmin] >= 1)
        {
         
SetPlayerPos(playerid,-149.9057,1079.6403,19.7422);
         
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You teleported to Russia Base");
        }
        else
        {
        
SendClientMessage(playeridCOLOR_RED "[SERVER]:You are not allowed to use this command");
        }
        return 
1;
    }
    if (
strcmp("/duel"cmdtexttrue))
    {
        
SetPlayerInterior(playerid,10);
        
SetPlayerColor(playerid,COLOR_YELLOW);
        
ResetPlayerWeapons(playerid);
        
GivePlayerWeapon(playerid,31,99999);
        
GivePlayerWeapon(playerid,27,99999);
        
GivePlayerWeapon(playerid,24,99999);
        
SetPlayerPos(playerid,-975.975708,1060.983032,1345.671875);
        
GameTextForPlayer(playerid,"~b~Welcome to ~r~Duel"50001);
        
SetPlayerHealth(playerid100);
        
SetPlayerArmour(playerid100);
        
SetPlayerSkin(playerid,73);
        return 
1;
    }
    if (
strcmp("/duel1"cmdtexttrue))
    {
        
SetPlayerInterior(playerid,10);
        
SetPlayerColor(playerid,COLOR_GREEN);
        
ResetPlayerWeapons(playerid);
        
GivePlayerWeapon(playerid,31,99999);
        
GivePlayerWeapon(playerid,27,99999);
        
GivePlayerWeapon(playerid,24,99999);
        
SetPlayerPos(playerid,-1130.9126,1057.6101,1346.4174);
        
GameTextForPlayer(playerid,"~b~Welcome to ~r~Duel"50001);
        
SetPlayerHealth(playerid100);
        
SetPlayerArmour(playerid100);
        
SetPlayerSkin(playerid,287);
        return 
1;
    }
    if (
strcmp("/skin"cmdtext))
    {
        if(
Player[playerid][pAdmin] >= 1)
        {
            
SetPlayerSkin(playerid,23);
            
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You have changed your skin to id 23.");
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED,"[SERVER]:You are not allowed to use this command.");
        }
        return 
1;
    }
    if (
strcmp("/skin1"cmdtexttrue))
    {
        if(
Player[playerid][pAdmin] >= 1)
        {
            
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You have changed your skin to id 29.");
            
SetPlayerSkin(playerid,29);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED,"[SERVER]:You are not allowed to use this command.");
        }
        return 
1;
    }
    if (
strcmp("/getcar"cmdtexttrue))
    {
        if(
Player[playerid][pAdmin] >= 1)
        {
        new 
Float:X;
        new 
Float:Y;
        new 
Float:Z;
        
GetPlayerPos(playerid,X,Y,Z);
        
CreateVehicle(411,X,Y+5,Z,1,126,126,9000);
        
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You spawned a Infernus");
        }
        else
        {
        
SendClientMessage(playerid,COLOR_RED"[SERVER]:You are not allowed to use this command.");
        }
        return 
1;
    }
    if (
strcmp("/getbike"cmdtexttrue))
    {
        if(
Player[playerid][pAdmin] >= 1)
        {
        new 
Float:X;
        new 
Float:Y;
        new 
Float:Z;
        
GetPlayerPos(playerid,X,Y,Z);
        
CreateVehicle(522,X,Y+5,Z,1,126,126,9000);
        
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You spawned a NRG-500");
        }
        else
        {
        
SendClientMessage(playerid,COLOR_RED"[SERVER]:You are not allowed to use this command.");
        }
        return 
1;
    }
    if (
strcmp("/getplane"cmdtexttrue))
    {
        if(
Player[playerid][pAdmin] >= 1)
        {
        new 
Float:X;
        new 
Float:Y;
        new 
Float:Z;
        
GetPlayerPos(playerid,X,Y,Z);
        
CreateVehicle(520,X,Y+10,Z,1,126,126,9000);
        
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You spawned a Hydra");
        }
        else
        {
        
SendClientMessage(playerid,COLOR_RED"[SERVER]:You are not allowed to use this command.");
        }
        return 
1;
    }
    if (
strcmp("/flip"cmdtexttrue))
    {
        if(
Player[playerid] [pAdmin] >=1)
        {
            if(
IsPlayerInAnyVehicle(playerid))
            {
            new 
vehicleid;
            new 
Float:angle;
            
vehicleidGetPlayerVehicleID(playerid);
            
GetVehicleZAngle(vehicleid,angle);
            
SetVehicleZAngle(vehicleid,angle);
            
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:Your vehicle has been fliped.");
            }
            else
            {
            
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You need to be inside a car to use this command");
            }
        }
        else
        {
        
SendClientMessage(playerid,COLOR_RED,"[SERVER]:You are not allowed to use this command.");
        }
        return 
1;
    }
    if (
strcmp("/tune"cmdtexttrue))
    {
        if(
Player[playerid] [pAdmin] >=1)
        {
            if(
IsPlayerInAnyVehicle(playerid))
            {
                new 
vehicleid;
                
vehicleidGetPlayerVehicleID(playerid);
                
RemoveVehicleComponent(vehicleid,1010);
                
RemoveVehicleComponent(vehicleid,1000);
                
RemoveVehicleComponent(vehicleid,1087);
                
SetVehicleNumberPlate(vehicleid,"VIP1377");
                
AddVehicleComponent(vehicleid,1010);
                
AddVehicleComponent(vehicleid,1000);
                
AddVehicleComponent(vehicleid,1087);
                
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:Your vehicle has been tuned.");
            }
            else
            {
                
SendClientMessage(playerid,COLOR_RED,"[SERVER]:You need to be inside a car to use this command.");
            }
        }
        else
        {
        
SendClientMessage(playerid,COLOR_RED"[SERVER]:You are not allowed to use this command.");
        }
    }
       if (
strcmp("/respawncar"cmdtexttrue))
    {
        if(
Player[playerid] [pAdmin] >=1)
        {
            if(
IsPlayerInAnyVehicle(playerid))
            {
            new 
vehicleid;
            
vehicleidGetPlayerVehicleID(playerid);
            
SetVehicleToRespawn(vehicleid);
            }
            else
            {
            
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You need to be inside a car to use this command");
            }
        }
        else
        {
        
SendClientMessage(playerid,COLOR_RED,"[SERVER]:You are not allowed to use this command.");
        }
        return 
1;
    }
    if (
strcmp("/destroycar"cmdtexttrue))
    {
        if(
Player[playerid] [pAdmin] >=1)
        {
            if(
IsPlayerInAnyVehicle(playerid))
            {
            new 
vehicleid;
            
vehicleidGetPlayerVehicleID(playerid);
            
DestroyVehicle(vehicleid);
            }
            else
            {
            
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You need to be inside a car to use this command");
            }
        }
        else
        {
        
SendClientMessage(playerid,COLOR_RED"[SERVER]:You are not allowed to use this command.");
        }
        return 
1;
    }
    if (
strcmp("/fix"cmdtexttrue))
    {
        if(
Player[playerid][pAdmin] >= 1)
        {
            if(
IsPlayerInAnyVehicle(playerid))
            {
                
RepairVehicle(GetPlayerVehicleID(playerid));
                
SendClientMessage(playerid,COLOR_RED,"[SERVER]:You have repaired your vehicle");
            }
            else
            {
            
SendClientMessage(playeridCOLOR_RED,"[SERVER]:You are not driving any car");
            }
    }
        else
    {
         
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You are not allowed to use this command");
    }
        return 
1;
    }
    if (
strcmp("/restart"cmdtexttrue))
    {
        if(
Player[playerid][pAdmin] >= 1)
        {
            
SendClientMessageToAll(COLOR_YELLOW,"[SERVER]:Server is restarting be patient do not quit please");
            
GameTextForAll("~G~Server Restarting"90001);
            
SendRconCommand("gmx");
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"[SERVER]:You are not allowed to use this command");
        }
        return 
1;
    }
    if (
strcmp("/desertairport"cmdtexttrue))
    {
        if(
Player[playerid][pAdmin] >= 1)
        {
             
SetPlayerPos(playerid,392.2665,2535.1682,16.5429);
             
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You teleported to Desert Airport");
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED "[SERVER]:You are not allowed to use this command");
        }
        return 
1;
    }
    return 
0;

Reply


Messages In This Thread
HELP REP++++++++++ - by Gogeta101 - 29.08.2014, 00:45
Re: HELP REP++++++++++ - by Jefff - 29.08.2014, 01:05
Re: HELP REP++++++++++ - by JuanStone - 29.08.2014, 01:25
Re: HELP REP++++++++++ - by Don_Cage - 29.08.2014, 02:19
Re: HELP REP++++++++++ - by Gogeta101 - 29.08.2014, 10:43
Re: HELP REP++++++++++ - by Gogeta101 - 29.08.2014, 12:42
Re: HELP REP++++++++++ - by Clad - 29.08.2014, 12:47
Re: HELP REP++++++++++ - by JuanStone - 30.08.2014, 00:48

Forum Jump:


Users browsing this thread: 3 Guest(s)