Need help SendClientMessage.
#1

Hey...

Can i have a problem on my script it are not a error it are a sendclientmessage when you try to use the command and it will fail if they not are the skin 295.

When a id 200 or another skin try the command will it say " You cant use this command ". And then a 295 use the skin will it say " Welcome to the weapon store "

PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#define DIALOG_WEAPONS 3
#define HEAVY_WEAPONS 1
#define LIGHT_WEAPONS 2
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
#else
main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}
#endif
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/grabgun"cmdtexttrue10) == 0)
    {
        if(
GetPlayerSkin(playerid) == 295) return SendClientMessage(playerid,0xAA3333AA"You are not the leader or the co-leader of LF");
        if(
GetPlayerSkin(playerid) == 295)
        if(
IsPlayerInRangeOfPoint(playerid10.01391.7061,-1897.6222,13.4973,272.6257))
        
ShowPlayerDialog(playeridDIALOG_WEAPONSDIALOG_STYLE_LIST"Weapons""Small Weapons\nHeavy Weapons""Select""Close");
         return 
1;
    }
    return 
0;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_WEAPONS)
    {
        if(
response// If they clicked 'Select' or double-clicked a weapon
        
{
            
// Give them the weapon
            
if(listitem == 0// They selected the first item - Desert Eagle
            
{
                
ShowPlayerDialog(playeridLIGHT_WEAPONSDIALOG_STYLE_LIST"Weapons""Desert Eagle\nColt\nShotgun\nMicro-10\nTec-9\nMP5""Select""Close");
            }
            if(
listitem == 1// They selected the second item - AK-47
            
{
                
ShowPlayerDialog(playeridHEAVY_WEAPONSDIALOG_STYLE_LIST"Weapons""AK-47\nM4\nCombat-shotgun""Select""Close");
            }
        }
        return 
1// We handled a dialog, so return 1. Just like OnPlayerCommandText.
    
}
    if(
dialogid == LIGHT_WEAPONS)
    {
        if(
response// If they clicked 'Select' or double-clicked a weapon
        
{
        if(
listitem == 0// They selected the first item - Desert Eagle
            
{
            
GivePlayerWeapon(playerid24599);
            }
            if(
listitem == 1// They selected the first item - Desert Eagle
            
{
                       
GivePlayerWeapon(playerid22599);
            }
            
            if(
listitem == 2// They selected the first item - Desert Eagle
            
{
                       
GivePlayerWeapon(playerid25599);
            }
            
            if(
listitem == 3// They selected the first item - Desert Eagle
            
{
                       
GivePlayerWeapon(playerid28599);
            }
            
            if(
listitem == 4// They selected the first item - Desert Eagle
            
{
                       
GivePlayerWeapon(playerid32599);
            }
            
            if(
listitem == 5// They selected the first item - Desert Eagle
            
{
                       
GivePlayerWeapon(playerid29599);
            }
        }
        }
        if(
dialogid == HEAVY_WEAPONS)
    {
        if(
response// If they clicked 'Select' or double-clicked a weapon
        
{
         if(
listitem == 0// They selected the first item - Desert Eagle
            
{
            
GivePlayerWeapon(playerid30300);
            }
             if(
listitem == 1// They selected the first item - Desert Eagle
            
{
            
GivePlayerWeapon(playerid31300);
            }
             if(
listitem == 2// They selected the first item - Desert Eagle
            
{
            
GivePlayerWeapon(playerid27300);
            }
        }
        }
    return 
0// You MUST return 0 here! Just like OnPlayerCommandText.

Reply
#2

pawn Код:
if(GetPlayerSkin(playerid) != 295) return SendClientMessage(playerid,0xAA3333AA, "You are not the leader or the co-leader of LF");
Reply
#3

Thanks it work. but how to make more then one there can use the skin?
Reply
#4

pawn Код:
if (strcmp("/grabgun", cmdtext, true, 10) == 0)
    {
        if(GetPlayerSkin(playerid) != 295 || GetPlayerSkin(playerid) != 294) return SendClientMessage(playerid,0xAA3333AA, "You are not the leader or the co-leader of LF");
        if(IsPlayerInRangeOfPoint(playerid, 10.0, 1391.7061,-1897.6222,13.4973,272.6257))
        ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "Small Weapons\nHeavy Weapons", "Select", "Close");
         return 1;
    }
now it will works with skin 295 and 294 ,because "||" is equal to "or"
Reply
#5

I have a problem can you help me?.

Then i use the command and i am the skin did it say all time " You are not a member of LSPD "

PHP код:
#include <a_samp>
#define FILTERSCRIPT
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xAA3333AA
new LSPDGate;
new 
hq;
new 
cell;
new 
LF;
new 
GD1;
new 
GD2;
public 
OnFilterScriptExit()
{
    return 
1;
}
public 
OnFilterScriptInit()
{
    
//Objects
    
CreateObject(1569,246.8999900,72.5000000,1002.5999800,0.0000000,0.0000000,0.0000000); //object(adam_v_door) (1)
CreateObject(983,1544.6999500,-1620.8000500,13.2000000,0.0000000,0.0000000,0.0000000); //object(fenceshit3) (1)
CreateObject(983,1543.5000000,-1635.9000200,13.3000000,0.0000000,0.0000000,0.0000000); //object(fenceshit3) (2)
CreateObject(1495,1582.5999800,-1637.9000200,12.4000000,0.0000000,0.0000000,0.0000000); //object(gen_doorext01) (1)
CreateObject(1408,2502.5000000,-1742.3000500,13.1000000,0.0000000,0.0000000,180.2500000); //object(dyn_f_wood_2) (1)
CreateObject(1408,2489.5000000,-1742.3000500,13.1000000,0.0000000,0.0000000,180.2470000); //object(dyn_f_wood_2) (2)
CreateObject(1408,2486.6999500,-1745.0000000,13.1000000,0.0000000,0.0000000,268.7470000); //object(dyn_f_wood_2) (3)
CreateObject(1408,2486.6001000,-1750.5999800,13.1000000,0.0000000,0.0000000,268.7420000); //object(dyn_f_wood_2) (4)
CreateObject(1408,2486.5000000,-1755.4000200,13.1000000,0.0000000,0.0000000,268.7420000); //object(dyn_f_wood_2) (5)
CreateObject(2311,2491.1001000,-1747.1999500,12.5000000,0.0000000,0.0000000,269.7500000); //object(cj_tv_table2) (1)
CreateObject(2311,2490.8000500,-1753.1999500,12.5000000,0.0000000,0.0000000,269.7470000); //object(cj_tv_table2) (3)
CreateObject(1709,2490.1001000,-1751.3000500,12.5000000,0.0000000,0.0000000,90.2500000); //object(kb_couch08) (1)
CreateObject(1710,2489.0000000,-1755.4000200,12.5000000,0.0000000,0.0000000,89.0000000); //object(kb_couch07) (1)
CreateObject(2219,2491.1001000,-1748.5999800,13.1000000,333.3600000,22.4970000,336.5200000); //object(pizzamed) (1)
CreateObject(2222,2491.1001000,-1747.4000200,13.1000000,0.0000000,0.0000000,0.0000000); //object(rustyhigh) (1)
CreateObject(2814,2491.1001000,-1748.6999500,12.6000000,0.0000000,0.0000000,0.0000000); //object(gb_takeaway01) (1)
CreateObject(2837,2490.8000500,-1753.1999500,13.0000000,0.0000000,0.0000000,0.0000000); //object(gb_takeaway02) (1)
CreateObject(2838,2490.8000500,-1754.5999800,13.0000000,0.0000000,0.0000000,0.0000000); //object(gb_takeaway03) (1)
CreateObject(955,2493.5000000,-1759.8000500,12.9000000,0.0000000,0.0000000,178.0000000); //object(cj_ext_sprunk) (1)
CreateObject(983,2482.6001000,-1722.0000000,13.2000000,0.0000000,0.0000000,88.0000000); //object(fenceshit3) (3)
CreateObject(983,2482.6001000,-1722.0000000,13.2000000,0.0000000,0.0000000,88.0000000); //object(fenceshit3) (3)
CreateObject(1569,246.8999900,72.5000000,1002.5999800,0.0000000,0.0000000,0.0000000);
CreateObject(983,2255.5000000,-2241.1999500,16.9000000,0.0000000,0.0000000,315.7500000); //object(fenceshit3) (1)
CreateObject(982,2248.6999500,-2229.8000500,16.9000000,0.0000000,0.0000000,45.0000000); //object(fenceshit) (1)
CreateObject(982,2230.6001000,-2211.6999500,16.9000000,0.0000000,0.0000000,44.9950000); //object(fenceshit) (2)
CreateObject(982,2212.5000000,-2193.6001000,16.9000000,0.0000000,0.0000000,44.9950000); //object(fenceshit) (3)
CreateObject(982,2207.6999500,-2188.8000500,16.9000000,0.0000000,0.0000000,44.9950000); //object(fenceshit) (4)
CreateObject(982,2189.6001000,-2188.8000500,16.9000000,0.0000000,0.0000000,134.9950000); //object(fenceshit) (5)
CreateObject(982,2171.5000000,-2206.8999000,16.9000000,0.0000000,0.0000000,134.9890000); //object(fenceshit) (6)
CreateObject(982,2153.3999000,-2225.0000000,16.9000000,0.0000000,0.0000000,134.9890000); //object(fenceshit) (7)
CreateObject(982,2135.3000500,-2243.1001000,16.9000000,0.0000000,0.0000000,134.9890000); //object(fenceshit) (8)
CreateObject(982,2124.5000000,-2253.8000500,16.9000000,0.0000000,0.0000000,134.9890000); //object(fenceshit) (9)
CreateObject(983,2114.3000500,-2265.8000500,16.9000000,0.0000000,0.0000000,337.5000000); //object(fenceshit3) (2)
CreateObject(983,2112.1001000,-2271.1999500,16.9000000,0.0000000,0.0000000,337.4950000); //object(fenceshit3) (3)
CreateObject(984,2110.8999000,-2286.6999500,16.8000000,0.0000000,0.0000000,0.0000000); //object(fenceshit2) (2)
CreateObject(984,2110.8999000,-2299.5000000,16.8000000,0.0000000,0.0000000,0.0000000); //object(fenceshit2) (3)
CreateObject(984,2110.8999000,-2305.5000000,16.8000000,0.0000000,0.0000000,0.0000000); //object(fenceshit2) (4)
CreateObject(984,2117.1999500,-2313.0000000,16.8000000,0.0000000,0.0000000,79.5000000); //object(fenceshit2) (5)
CreateObject(984,2124.5000000,-2314.3000500,16.8000000,0.0000000,0.0000000,79.4970000); //object(fenceshit2) (6)
CreateObject(984,2136.5000000,-2318.1001000,16.8000000,0.0000000,0.0000000,63.9970000); //object(fenceshit2) (7)
CreateObject(984,2143.6999500,-2321.6001000,16.8000000,0.0000000,0.0000000,63.9950000); //object(fenceshit2) (8)
CreateObject(984,2154.1999500,-2328.1999500,16.8000000,0.0000000,0.0000000,53.0000000); //object(fenceshit2) (9)
CreateObject(984,2164.1999500,-2336.1001000,16.8000000,0.0000000,0.0000000,50.9980000); //object(fenceshit2) (10)
CreateObject(984,2174.1999500,-2344.1999500,16.8000000,0.0000000,0.0000000,50.9930000); //object(fenceshit2) (11)
CreateObject(984,2180.8999000,-2349.5000000,16.8000000,0.0000000,0.0000000,51.9930000); //object(fenceshit2) (12)
CreateObject(982,2195.1001000,-2344.5000000,16.7000000,0.0000000,0.0000000,314.7500000); //object(fenceshit) (11)
CreateObject(982,2213.1001000,-2326.3999000,16.7000000,0.0000000,0.0000000,314.7470000); //object(fenceshit) (12)
CreateObject(982,2231.3000500,-2308.3000500,16.7000000,0.0000000,0.0000000,315.2470000); //object(fenceshit) (13)
CreateObject(3014,2147.3000500,-2264.6001000,13.7000000,0.0000000,0.0000000,0.0000000); //object(cr_guncrate) (1)
CreateObject(3014,2148.3999000,-2265.6001000,13.7000000,0.0000000,0.0000000,0.0000000); //object(cr_guncrate) (2)
CreateObject(3014,2149.5000000,-2266.6001000,13.7000000,0.0000000,0.0000000,0.0000000); //object(cr_guncrate) (3)
CreateObject(3014,2150.3999000,-2267.5000000,13.7000000,0.0000000,0.0000000,0.0000000); //object(cr_guncrate) (4)
CreateObject(3014,2151.5000000,-2268.6001000,13.7000000,0.0000000,0.0000000,0.0000000); //object(cr_guncrate) (5)
CreateObject(349,2151.5000000,-2268.6999500,14.0000000,0.0000000,0.0000000,0.0000000); //object(3)
CreateObject(352,2150.3000500,-2267.5000000,14.0000000,5.8680000,347.9360000,1.2520000); //object(4)
CreateObject(355,2149.5000000,-2266.6001000,14.0000000,355.0650000,350.7150000,359.1940000); //object(5)
CreateObject(372,2148.3999000,-2265.6001000,14.0000000,14.0000000,0.0000000,0.0000000); //object(6)
CreateObject(373,2147.5000000,-2264.8000500,14.3000000,336.8400000,298.3660000,25.9290000); //object(7)
CreateObject(3626,2197.3999000,-2240.6001000,13.8000000,0.0000000,0.0000000,134.9950000); //object(dckwrkhut) (1)
CreateObject(3084,2264.1001000,-2254.6001000,14.0000000,0.0000000,0.0000000,314.5000000); //object(trdcsgrgdoor_lvs) (1)
CreateObject(1433,2200.3999000,-2242.6001000,12.8000000,0.0000000,0.0000000,43.5000000); //object(dyn_table_1) (1)
CreateObject(2867,2200.5000000,-2242.5000000,13.3000000,0.0000000,0.0000000,0.0000000); //object(gb_foodwrap05) (1)
CreateObject(1712,2194.6001000,-2240.1001000,12.6000000,0.0000000,0.0000000,130.7500000); //object(kb_couch05) (1)
CreateObject(1518,2195.3999000,-2236.8999000,14.7000000,21.2500000,359.7320000,346.8470000); //object(dyn_tv_2) (1)
CreateObject(1687,2193.3999000,-2236.6999500,13.2000000,0.0000000,0.0000000,224.2450000); //object(gen_roofbit1) (1)
CreateObject(1569,246.8999900,72.5000000,1002.5999800,0.0000000,0.0000000,0.0000000);
CreateObject(16409,1392.1700439,-1896.4799805,12.4399996,0.0000000,0.0000000,0.0000000); //object(by_weehangr) (1)
CreateObject(18613,1386.4820557,-1893.2259521,13.7620001,271.0001526,0.0000000,270.0000000); //object(cs_landbit_61_a) (1)
CreateObject(18613,1389.9499512,-1893.2299805,13.8299999,270.9997559,0.0000000,270.0000000); //object(cs_landbit_61_a) (2)
CreateObject(18613,1393.4499512,-1893.2299805,13.8999996,270.9997559,0.0000000,270.0000000); //object(cs_landbit_61_a) (3)
CreateObject(18613,1396.9200439,-1893.2399902,13.9600000,270.9997559,0.0000000,270.0000000); //object(cs_landbit_61_a) (4)
CreateObject(18613,1397.7099609,-1895.0400391,13.9899998,270.0000000,180.0000000,359.9998779); //object(cs_landbit_61_a) (5)
CreateObject(18613,1397.7099609,-1898.5200195,14.0100002,270.2438965,0.0000000,180.2445068); //object(cs_landbit_61_a) (6)
CreateObject(18613,1397.6999512,-1900.4000244,14.0100002,270.2414856,0.0000000,179.7416992); //object(cs_landbit_61_a) (7)
CreateObject(372,1385.4399414,-1893.3800049,13.8400002,0.0000000,0.0000000,0.0000000); //object(10)
CreateObject(352,1387.1800537,-1893.3599854,13.9200001,0.0000000,0.0000000,0.0000000); //object(11)
CreateObject(353,1388.4799805,-1893.3800049,13.8199997,0.0000000,0.0000000,8.5000000); //object(12)
CreateObject(346,1390.0100098,-1893.3499756,13.9399996,0.0000000,0.0000000,356.5000000); //object(13)
CreateObject(347,1391.2700195,-1893.3599854,13.9899998,0.0000000,0.0000000,357.0000000); //object(14)
CreateObject(348,1392.7500000,-1893.3599854,14.0299997,0.0000000,0.0000000,2.2500000); //object(15)
CreateObject(349,1394.1400146,-1893.3599854,14.0400000,0.0000000,0.0000000,6.0000000); //object(16)
CreateObject(350,1396.0000000,-1893.3599854,14.0799999,0.0000000,0.0000000,1.2500000); //object(17)
CreateObject(351,1397.5699463,-1894.0300293,14.0200005,0.0000000,0.0000000,275.0000000); //object(18)
CreateObject(355,1397.5799561,-1895.9599609,14.0600004,359.7500000,0.0000000,275.5000000); //object(19)
CreateObject(356,1397.5699463,-1898.0400391,14.0100002,0.0000000,0.0000000,275.2500000); //object(20)
CreateObject(344,1397.5500488,-1899.5400391,14.0100002,0.0000000,0.0000000,0.0000000); //object(21)
CreateObject(342,1397.5600586,-1900.7600098,13.9799995,0.0000000,343.0000000,0.0000000); //object(22)
CreateObject(3014,2150.8701172,-2269.0900879,13.6899996,0.0000000,0.0000000,0.0000000); //object(cr_guncrate) (1)
CreateObject(3014,2149.8400879,-2268.0700684,13.6899996,0.0000000,0.0000000,0.0000000); //object(cr_guncrate) (2)
CreateObject(3014,2148.8500977,-2267.0000000,13.6899996,0.0000000,0.0000000,0.0000000); //object(cr_guncrate) (3)
CreateObject(3014,2147.8000488,-2265.8798828,13.6899996,0.0000000,0.0000000,0.0000000); //object(cr_guncrate) (4)
CreateObject(3014,2146.6699219,-2264.8999023,13.6899996,0.0000000,0.0000000,0.0000000); //object(cr_guncrate) (5)
CreateObject(1703,327.1799927,-1146.9899902,80.5899963,0.0000000,0.0000000,47.5000000); //object(kb_couch02) (1)
CreateObject(1703,328.6099854,-1149.6099854,80.5899963,0.0000000,0.0000000,134.4993896); //object(kb_couch02) (2)
CreateObject(1516,329.1900024,-1147.5400391,80.5899963,0.0000000,0.0000000,0.0000000); //object(dyn_table_03) (1)
CreateObject(359,329.2500000,-1147.4799805,81.1200027,88.3991699,51.3439026,352.9169006); //object(23)
CreateObject(625,303.6799927,-1156.6199951,80.7099991,0.0000000,0.0000000,0.0000000); //object(veg_palmkb1) (1)
CreateObject(625,299.8699951,-1152.7600098,80.6999969,0.0000000,0.0000000,0.0000000); //object(veg_palmkb1) (2)
CreateObject(738,313.7500000,-1129.2099609,79.9400024,0.0000000,0.0000000,42.2500000); //object(aw_streettree2) (1)
CreateObject(738,325.4299927,-1140.8599854,79.9199982,0.0000000,0.0000000,42.2479248); //object(aw_streettree2) (2)
    //Gang Zones
    //Gates
    
LSPDGate CreateObject(3055,1588.5000000,-1637.9000200,14.6000000,0.0000000,0.0000000,0.0000000);
    
hq CreateObject(1569,245.3999900,72.5000000,1002.5999800,0.0000000,0.0000000,0.0000000);
    
cell CreateObject(2930,266.3999900,83.9000000,1002.5999800,0.0000000,0.0000000,0.0000000);
    
LF CreateObject(16501,1384.7900391,-1897.4799805,14.6300001,0.0000000,0.0000000,0.0000000);
    
GD1 CreateObject(7657,2234.1000977,-2215.2900391,14.2600002,0.0000000,0.0000000,135.0000000);
    
GD2 CreateObject(16501,2178.1000977,-2254.8500977,15.9700003,0.0000000,0.0000000,315.2500000); //object(cn2_savgardr2_) (1)
    
return 1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/ogate"true))
    {
        if(
GetPlayerSkin(playerid) != 280 || GetPlayerSkin(playerid) != 281 || GetPlayerSkin(playerid) != 282 || GetPlayerSkin(playerid) != 283 || GetPlayerSkin(playerid) != 284 || GetPlayerSkin(playerid) != 285) return SendClientMessage(playerid,0xAA3333AA"You are not a member of LSPD");
        if(
GetPlayerSkin(playerid) == 280)
        if(
GetPlayerSkin(playerid) == 281)
        if(
GetPlayerSkin(playerid) == 282)
        if(
GetPlayerSkin(playerid) == 283)
        if(
GetPlayerSkin(playerid) == 284)
        if(
GetPlayerSkin(playerid) == 285)
        
SendClientMessage(playeridCOLOR_ORANGE"INFO: you have open the gate");
        if(
IsPlayerInRangeOfPoint(playerid,10.0,1588.5000000,-1637.9000200,14.6000000))
        {
            
MoveObject(LSPDGate,1588.5000000,-1637.9000200,19.4000000,2.00000000.00.00.0);
            return 
1;
          }
else return 
SendClientMessage(playeridCOLOR_ORANGE"You are not near the gate");
}
    if(!
strcmp(cmdtext"/cgate"true))
    {
        if(
GetPlayerSkin(playerid) != 280 || GetPlayerSkin(playerid) != 281 || GetPlayerSkin(playerid) != 282 || GetPlayerSkin(playerid) != 283 || GetPlayerSkin(playerid) != 284 || GetPlayerSkin(playerid) != 285) return SendClientMessage(playerid,0xAA3333AA"You are not a member of LSPD");
        
SendClientMessage(playeridCOLOR_ORANGE"INFO: you have closed the gate");
        if(
IsPlayerInRangeOfPoint(playerid,10.0,1588.5000000,-1637.9000200,14.6000000))
        {
            
MoveObject(LSPDGate,1588.5000000,-1637.9000200,14.6000000,2.00000000.00.00.0);
            return 
1;
           }
else return 
SendClientMessage(playeridCOLOR_ORANGE"You are not near the gate");
}
     if(!
strcmp(cmdtext"/openhq"true))
    {
        if(
GetPlayerSkin(playerid) != 280 || GetPlayerSkin(playerid) != 281 || GetPlayerSkin(playerid) != 282 || GetPlayerSkin(playerid) != 283 || GetPlayerSkin(playerid) != 284 || GetPlayerSkin(playerid) != 285) return SendClientMessage(playerid,0xAA3333AA"You are not a member of LSPD");
        if(
GetPlayerSkin(playerid) == 280)
        if(
GetPlayerSkin(playerid) == 281)
        if(
GetPlayerSkin(playerid) == 282)
        if(
GetPlayerSkin(playerid) == 283)
        if(
GetPlayerSkin(playerid) == 284)
        if(
GetPlayerSkin(playerid) == 285)
        
SendClientMessage(playeridCOLOR_ORANGE"INFO: you have closed the gate");
        if(
IsPlayerInRangeOfPoint(playerid,10.0,244.0000000,72.5000000,1002.5999800))
        {
            
MoveObject(hq,244.0000000,72.5000000,1002.5999800,2.00000000.00.00.0);
            return 
1;
            }
else return 
SendClientMessage(playeridCOLOR_ORANGE"You are not near the gate");
}
    if(!
strcmp(cmdtext"/closehq"true))
    {
        if(
GetPlayerSkin(playerid) != 280 || GetPlayerSkin(playerid) != 281 || GetPlayerSkin(playerid) != 282 || GetPlayerSkin(playerid) != 283 || GetPlayerSkin(playerid) != 284 || GetPlayerSkin(playerid) != 285) return SendClientMessage(playerid,0xAA3333AA"You are not a member of LSPD");
        if(
GetPlayerSkin(playerid) == 280)
        if(
GetPlayerSkin(playerid) == 281)
        if(
GetPlayerSkin(playerid) == 282)
        if(
GetPlayerSkin(playerid) == 283)
        if(
GetPlayerSkin(playerid) == 284)
        if(
GetPlayerSkin(playerid) == 285)
        
SendClientMessage(playeridCOLOR_ORANGE"INFO: you have closed the gate");
        if(
IsPlayerInRangeOfPoint(playerid,10.0,245.3999900,72.5000000,1002.5999800))
        {
            
MoveObject(hq,245.3999900,72.5000000,1002.5999800,2.00000000.00.00.0);
            return 
1;
           }
else return 
SendClientMessage(playeridCOLOR_ORANGE"You are not near the gate");
}
        if(!
strcmp(cmdtext"/cellop"true))
    {
        if(
GetPlayerSkin(playerid) != 280 || GetPlayerSkin(playerid) != 281 || GetPlayerSkin(playerid) != 282 || GetPlayerSkin(playerid) != 283 || GetPlayerSkin(playerid) != 284 || GetPlayerSkin(playerid) != 285) return SendClientMessage(playerid,0xAA3333AA"You are not a member of LSPD");
        if(
GetPlayerSkin(playerid) == 280)
        if(
GetPlayerSkin(playerid) == 281)
        if(
GetPlayerSkin(playerid) == 282)
        if(
GetPlayerSkin(playerid) == 283)
        if(
GetPlayerSkin(playerid) == 284)
        if(
GetPlayerSkin(playerid) == 285)
        
SendClientMessage(playeridCOLOR_ORANGE"INFO: you have open the gate");
        if(
IsPlayerInRangeOfPoint(playerid,10.0,266.3999900,82.4000000,1002.5999800))
        {
            
MoveObject(cell,266.3999900,82.4000000,1002.59998000.00.00.0);
            return 
1;
          }
else return 
SendClientMessage(playeridCOLOR_ORANGE"You are not near the gate");
}
    if(!
strcmp(cmdtext"/cellcl"true))
    {
        if(
GetPlayerSkin(playerid) != 280 || GetPlayerSkin(playerid) != 281 || GetPlayerSkin(playerid) != 282 || GetPlayerSkin(playerid) != 283 || GetPlayerSkin(playerid) != 284 || GetPlayerSkin(playerid) != 285) return SendClientMessage(playerid,0xAA3333AA"You are not a member of LSPD");
        if(
GetPlayerSkin(playerid) == 280)
        if(
GetPlayerSkin(playerid) == 281)
        if(
GetPlayerSkin(playerid) == 282)
        if(
GetPlayerSkin(playerid) == 283)
        if(
GetPlayerSkin(playerid) == 284)
        if(
GetPlayerSkin(playerid) == 285)
        
SendClientMessage(playeridCOLOR_ORANGE"INFO: you have closed the gate");
        if(
IsPlayerInRangeOfPoint(playerid,10.0,266.3999900,82.4000000,1002.5999800))
        {
            
MoveObject(cell,266.3999900,83.9000000,1002.59998000.00.00.0);
            return 
1;
           }
else return 
SendClientMessage(playeridCOLOR_ORANGE"You are not near the gate");
}
    if(!
strcmp(cmdtext"/mgarop"true))
    {
        if(
GetPlayerSkin(playerid) != 295) return SendClientMessage(playerid,0xAA3333AA"You are not the leader or the co-leader of LF");
        if(
GetPlayerSkin(playerid) == 295)
        if(
IsPlayerInRangeOfPoint(playerid,10.0,1384.7900391,-1897.4799805,14.63000010))
        {
            
MoveObject(LF,1384.7900391,-1897.4799805,10.2299995,2.0000000,0.0000000,0.0000000);
            return 
1;
        }
        else return 
SendClientMessage(playeridCOLOR_ORANGE"You are not near the gate");
    }
        if(!
strcmp(cmdtext"/mgarcl"true))
    {
        if(
GetPlayerSkin(playerid) != 295) return SendClientMessage(playerid,0xAA3333AA"You are not the leader or the co-leader of LF");
        if(
GetPlayerSkin(playerid) == 295)
        if(
IsPlayerInRangeOfPoint(playerid,10.0,1384.7900391,-1897.4799805,14.6300001))
        {
            
MoveObject(LF,1384.7900391,-1897.4799805,14.6300001,2.0000000,0.0000000,0.0000000);
            return 
1;
        }
else return 
SendClientMessage(playeridCOLOR_ORANGE"You are not near the gate");
}
if(!
strcmp(cmdtext"/opengdg"true))
    {
        if(
GetPlayerSkin(playerid) != 276 || GetPlayerSkin(playerid) != 29 || GetPlayerSkin(playerid) != 28) return SendClientMessage(playerid,0xAA3333AA"You cant not use this command.");
        if(
GetPlayerSkin(playerid) == 276)
        if(
GetPlayerSkin(playerid) == 29)
        if(
GetPlayerSkin(playerid) == 28)
        if(
IsPlayerInRangeOfPoint(playerid,45.0,2234.1000977,-2215.2900391,14.2600002))
        {
            
MoveObject(GD1,2222.5500488,-2203.7299805,14.26000022.00.00.0);
            return 
1;
        }
else return 
SendClientMessage(playeridCOLOR_ORANGE"You are not near the gate");
}
    if(!
strcmp(cmdtext"/closegdg"true))
    {
        if(
GetPlayerSkin(playerid) != 276 || GetPlayerSkin(playerid) != 29 || GetPlayerSkin(playerid) != 28) return SendClientMessage(playerid,0xAA3333AA"You cant not use this command.");
        if(
GetPlayerSkin(playerid) == 276)
        if(
GetPlayerSkin(playerid) == 29)
        if(
GetPlayerSkin(playerid) == 28)
        if(
IsPlayerInRangeOfPoint(playerid,45.0,2234.1000977,-2215.2900391,14.2600002))
        {
            
MoveObject(GD1,2234.1000977,-2215.2900391,14.26000022.00.00.0);
            return 
1;
        }
else return 
SendClientMessage(playeridCOLOR_ORANGE"You are not near the gate");
}
if(!
strcmp(cmdtext"/opengdg2"true))
    {
        if(
GetPlayerSkin(playerid) != 276 || GetPlayerSkin(playerid) != 29 || GetPlayerSkin(playerid) != 28) return SendClientMessage(playerid,0xAA3333AA"You cant not use this command.");
        if(
GetPlayerSkin(playerid) == 276)
        if(
GetPlayerSkin(playerid) == 29)
        if(
GetPlayerSkin(playerid) == 28)
        if(
IsPlayerInRangeOfPoint(playerid,45.0,2178.1000977,-2254.8500977,15.9700003))
        {
            
MoveObject(GD2,2178.1000977,-2254.8500977,19.79000092.00.00.0);
            return 
1;
        }
else return 
SendClientMessage(playeridCOLOR_ORANGE"You are not near the gate");
}
    if(!
strcmp(cmdtext"/closegdg2"true))
    {
        if(
GetPlayerSkin(playerid) != 276 || GetPlayerSkin(playerid) != 29 || GetPlayerSkin(playerid) != 28) return SendClientMessage(playerid,0xAA3333AA"You cant not use this command.");
        if(
GetPlayerSkin(playerid) == 276)
        if(
GetPlayerSkin(playerid) == 29)
        if(
GetPlayerSkin(playerid) == 28)
        if(
IsPlayerInRangeOfPoint(playerid,45.0,2178.1000977,-2254.8500977,15.9700003))
        {
            
MoveObject(GD2,2178.1000977,-2254.8500977,15.97000032.00.00.0);
            return 
1;
        }
else return 
SendClientMessage(playeridCOLOR_ORANGE"You are not near the gate");
}
    return 
0;

Reply
#6

at first u need to understand to functions and conditions what are u using and creating.

because this:
pawn Код:
if(GetPlayerSkin(playerid) == 280)
        if(GetPlayerSkin(playerid) == 281)
        if(GetPlayerSkin(playerid) == 282)
        if(GetPlayerSkin(playerid) == 283)
        if(GetPlayerSkin(playerid) == 284)
        if(GetPlayerSkin(playerid) == 285)
is BULLSHIT.

how can u have skin 280,281,282,283,284 and 285 at the same time? u dont need this lines.
because line above them will return if player hasnt required ID of skin.
Reply
#7

Ok but how can make SendClientMessage. so the skin there not are LSPD not can use the command`?
Reply
#8

pawn Код:
if(GetPlayerSkin(playerid) != 280 || GetPlayerSkin(playerid) != 281 || GetPlayerSkin(playerid) != 282 || GetPlayerSkin(playerid) != 283 || GetPlayerSkin(playerid) != 284 || GetPlayerSkin(playerid) != 285) return SendClientMessage(playerid,0xAA3333AA, "You are not a member of LSPD");
this line is making what u need. i really dont know what more u want...

when player hasnt skin 280, 281, 282, 283, 284 or 285 it will only return ClientMessage to player who used that command. but it will not open gate, or give wepons... understand?
Reply
#9

Yes.
Reply
#10

It work for the first skin and it not work for another skin like " 280 || 281,282,283,284 and 285 "
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)