[Pomoc]komanda /givegun

Započeo zanda55, Avgust 30, 2011, 11:36:45 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

ovo je komanda za dati oruzje jednom igracu   
   CMD:givegun(playerid, params[])
   {
      
      new idx;
      
       if(IsPlayerConnected(playerid))
       {
         temp = strtok(params, idx);
         if(!strlen(temp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /givegun {959561}[ID/DioImena] {838361} [weaponid(eg. 46 = Parachute)] [municija]");
            return 1;
         }
         new playa;
         new gun;
         new ammo;
         playa = ReturnUser(temp);
         temp = strtok(params, idx);
         gun = strval(temp);
         if(!strlen(temp))
         {
            SendClientMessage(playerid, COLOR_GRAD1, "{168BFF}INFO: {959561} /givegun {959561}[ID/DioImena] {838361} [weaponid] [municija]");
            SendClientMessage(playerid, COLOR_GRAD4, "3(Club) 4(knife) 5(bat) 6(Shovel) 7(Cue) 8(Katana) 10-13(Dildo) 14(Flowers) 16(Grenades) 18(Molotovs) 22(Pistol) 23(SPistol)");
            SendClientMessage(playerid, COLOR_GRAD3, "24(Eagle) 25(shotgun) 29(MP5) 30(AK47) 31(M4) 33(Rifle) 34(Sniper) 37(Flamethrower) 41(spray) 42(exting) 43(Camera) 46(Parachute)");
            return 1;
         }
         if(gun < 1||gun > 46||gun==27||gun==1||gun==2||gun==9||gun==17||gun==19||gun==20||gun==21||gun==39||gun==40||gun==44||gun==45)
         { SendClientMessage(playerid, COLOR_GRAD1, "   Pogresan ID oruzja!"); return 1; }
         temp = strtok(params, idx);
         ammo = strval(temp);

      
         if (PlayerInfo[playerid][pAdmin] >= 4)
         {
             if(IsPlayerConnected(playa))
             {
                 if(playa != INVALID_PLAYER_ID)
                 {
                  GivePlayerWeapon(playa, gun, ammo);
               }
            }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   Nisi ovlasten!");
         }
      }
      return 1;
   }

dali mi neko moze rec dai se moze napravit komanda da da oruzje svim igracima molim vas hitno jako mi je potrebno
Imam server ali roditelji mi nedaju da ga hostiram pa ako neko oce da dojde evo forum
http://balkan-samp-roleplay.playogame.com/
a preko hamachi ide ovako
ID:balkansamproleplay
PASS:1234
RP server (mod nije moj ali je dobar za zabavu ) dojdite i izvidite

   CMD:givegun(playerid, params[])
   {
     
      new idx;
       
       if(IsPlayerConnected(playerid))
       {
         temp = strtok(params, idx);
         if(!strlen(temp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /givegun{838361} [weaponid(eg. 46 = Parachute)] [municija]");
            return 1;
         }
         new gun;
         new ammo;
         gun = strval(temp);
         if(!strlen(temp))
         {
            SendClientMessage(playerid, COLOR_GRAD1, "{168BFF}INFO: {959561} /givegun {838361} [weaponid] [municija]");
            SendClientMessage(playerid, COLOR_GRAD4, "3(Club) 4(knife) 5(bat) 6(Shovel) 7(Cue) 8(Katana) 10-13(Dildo) 14(Flowers) 16(Grenades) 18(Molotovs) 22(Pistol) 23(SPistol)");
            SendClientMessage(playerid, COLOR_GRAD3, "24(Eagle) 25(shotgun) 29(MP5) 30(AK47) 31(M4) 33(Rifle) 34(Sniper) 37(Flamethrower) 41(spray) 42(exting) 43(Camera) 46(Parachute)");
            return 1;
         }
         if(gun < 1||gun > 46||gun==27||gun==1||gun==2||gun==9||gun==17||gun==19||gun==20||gun==21||gun==39||gun==40||gun==44||gun==45)
         { SendClientMessage(playerid, COLOR_GRAD1, "   Pogresan ID oruzja!"); return 1; }
         temp = strtok(params, idx);
         ammo = strval(temp);
          foreach(Player, playa)
         {
                  GivePlayerWeapon(playa, gun, ammo);
         }
      }
      return 1;
   }
Aequam memento rebus in arduis servare mentem.