Buygun problem
#1

I dont understend what is wrong here. I always get uzi if i write /buygunsawnoff, /buygunsniper etc. and i dont understend why that Can someone fix that i dont see any error or anything...

//---------------------[BUYGUN]-------------------------------

if(strcmp("/buygunuzi", cmdtext, true, 4) == 0){
if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dont have the Money for that");
if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR_DBLUE, "You must leave the DM First. type /kill to leave.");
GivePlayerWeapon(playerid,28,1500);
GivePlayerMoney(playerid, -10000);
return 1;
}


if(strcmp("/buygunm4",cmdtext,true,3) == 0){
if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dont have the Money for that");
if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR_DBLUE, "You must leave the DM First. type /kill to leave.");
GivePlayerWeapon(playerid,30,800);
GivePlayerMoney(playerid,-10000);
return 1;
}


if(strcmp("/buygundeagle",cmdtext,true,7) == 0){
if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dont have the Money for that");
if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR_DBLUE, "You must leave the DM First. type /kill to leave.");
GivePlayerWeapon(playerid,24,357);
GivePlayerMoney(playerid,-10000);
return 1;
}


if(strcmp("/buygunspas12",cmdtext,true,5) == 0){
if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dont have the Money for that");
if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR_DBLUE, "You must leave the DM First. type /kill to leave.");
GivePlayerWeapon(playerid,27,357);
GivePlayerMoney(playerid,-10000);
return 1;
}


if(strcmp("/buygunsniper",cmdtext,true,7) == 0){
if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dont have the Money for that");
if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR_DBLUE, "You must leave the DM First. type /kill to leave.");
GivePlayerWeapon(playerid,34,200);
GivePlayerMoney(playerid,10000);
return 1;
}

if(strcmp("/buygunsawnoff", cmdtext, true, 13) == 0){
if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dont have the Money for that");
if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR_DBLUE, "You must leave the DM First. type /kill to leave.");
GivePlayerWeapon(playerid, 28, 256);
GivePlayerMoney(playerid, -10000);
return 1;
}
Reply
#2

Anyone can help?
Reply
#3

pawn Код:
if(strcmp("/buygunsawnoff", cmdtext, true, 13) == 0)
    {
        if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dont have the Money for that");
        if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR_DBLUE, "You must leave the DM First. type /kill to leave.");
        GivePlayerWeapon(playerid, 28, 256); //< ID 28 is Micro Uzi
        GivePlayerMoney(playerid, -10000);
        return 1;
    }
pawn Код:
GivePlayerWeapon(playerid, weaponid, ammunition);
Get weapon IDs here:
https://sampwiki.blast.hk/wiki/Weapon_IDs
Reply
#4

pawn Код:
//---------------------[BUYGUN]-------------------------------

  if(strcmp("/buygunuzi", cmdtext, true, 4) == 0){
  if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dont have the Money for that");
  if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR_DBLUE, "You must leave the DM First. type /kill to leave.");
  GivePlayerWeapon(playerid,28,1500);
  GivePlayerMoney(playerid, -10000);
  return 1;
  }
 
 
  if(strcmp("/buygunm4",cmdtext,true,3) == 0){
  if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dont have the Money for that");
  if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR_DBLUE, "You must leave the DM First. type /kill to leave.");
  GivePlayerWeapon(playerid,30,800);
  GivePlayerMoney(playerid,-10000);
  return 1;
  }


  if(strcmp("/buygundeagle",cmdtext,true,7) == 0){
  if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dont have the Money for that");
  if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR_DBLUE, "You must leave the DM First. type /kill to leave.");
  GivePlayerWeapon(playerid,24,357);
  GivePlayerMoney(playerid,-10000);
  return 1;
  }
 
 
  if(strcmp("/buygunspas12",cmdtext,true,5) == 0){
  if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dont have the Money for that");
  if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR_DBLUE, "You must leave the DM First. type /kill to leave.");
  GivePlayerWeapon(playerid,27,357);
  GivePlayerMoney(playerid,-10000);
  return 1;
  }
 
 
  if(strcmp("/buygunsniper",cmdtext,true,7) == 0){
  if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dont have the Money for that");
  if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR_DBLUE, "You must leave the DM First. type /kill to leave.");
  GivePlayerWeapon(playerid,34,200);
  GivePlayerMoney(playerid,10000);
  return 1;
  }

  if(strcmp("/buygunsawnoff", cmdtext, true, 13) == 0){
  if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dont have the Money for that");
  if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR_DBLUE, "You must leave the DM First. type /kill to leave.");
  GivePlayerWeapon(playerid, 28, 256);
  GivePlayerMoney(playerid, -10000);
  return 1;
  }
Sorry for that post but...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)