[POMOC]weawpons packet

Započeo Arnel_Bp, Avgust 29, 2013, 21:13:34 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Moja od 0
Detaljan opis problema: pa kako da napravim neku komandu np. /givegunvip [id] i kad kucam neci id da mu dam np. m4, uzi, sawn-off i tako to ja znam samome sebi dati ali nzm kako drigima ? ako moze neko da mi pokaze ?
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno)://

   if(strcmp(cmd, "/givegun", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /givegun [ID Igraca/Dio Imena] [id oruzija(eg. 46 = Padobran)] [municija]");
            return 1;
         }
         new playa;
         new gun;
         new ammo;
         playa = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         gun = strval(tmp);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD1, "Koriscenje: /givegun [ID Igraca/Dio Imena] [weaponid] [ammo]");
            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==35||gun==36||gun==39||gun==40||gun==44||gun==45)
         { SendClientMessage(playerid, WHITE, "("COL_RED"RolePlay{FFFFFF}!) Pogresan ID oruzija!"); return 1; }
         tmp = strtok(cmdtext, idx);
         ammo = strval(tmp);
         if(ammo <1||ammo > 9999)
         { SendClientMessage(playerid, WHITE, "("COL_RED"RolePlay{FFFFFF}!) Nemojte ispod "COL_RED"1 {FFFFFF}ili preko "COL_RED"9999 {FFFFFF}metaka!"); return 1; }
         if (PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pGameSage] >= 4)
         {
             if(IsPlayerConnected(playa))
             {
                 if(playa != INVALID_PLAYER_ID)
                 {
                  SafeGivePlayerWeapon(playa, gun, ammo);
                  GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  format(string, 256, "("COL_RED"RolePlay{FFFFFF}!) "COL_RED"%s {FFFFFF}je dao "COL_RED"%s-u {FFFFFF}oruzije (ID): "COL_RED"%d.", sendername,giveplayer,gun);
                  ABroadCast(WHITE,string,1);
               }
            }
         }
         else
         {
            SendClientMessage(playerid, WHITE, "("COL_RED"RolePlay{FFFFFF}!) Niste ovlasteni da koristite tu komandu!");
         }
      }
      return 1;
   }