Hey guys. problem over here
#3

Well, right now, all you need to do is add one more tmp.

Код:
dcmd_dealweed(playerid, params[])
{
 if(PlayerInfo[playerid][Drugs] >= 1)
  {
   new tmp[25], tmp2[25],tmp3[25], Index,amount,price;
   tmp = strtok(params,Index),
   tmp2 = strtok(params,Index);
   tmp3 = strtok(params,Index);
   if(!strlen(tmp) || !strlen(tmp2) || !strlen(tmp3)) return SendClientMessage(playerid, red, "USAGE: /dealweed [playerid]");
   new player1,playername[MAX_PLAYER_NAME], string[128];
   player1 = strval(tmp);
   amount=strval(tmp2);
   price= strval(tmp3);
   

   GetPlayerName(player1,playername,sizeof(playername));

  format(string,sizeof(string),"You gave %s %d weed",playername,amount);
  SendClientMessage(playerid,red,string);
	PlayerInfo[player1][GSF] += amount;
	SendClientMessage(player1,red,"You have +%d weed",amount);
      GivePlayerMoney(playerid,GetPlayerMoney(playerid)+price);
      GivePlayerMoney(player1,GetPlayerMoney(playerid)-price);
  }
  else SendClientMessage(playerid,red,"You don't have weed");

	return 1;
}
}
Reply


Messages In This Thread
Hey guys. problem over here - by bartje01 - 01.06.2010, 21:24
Re: Hey guys. problem over here - by bartje01 - 02.06.2010, 06:32
Re: Hey guys. problem over here - by DJDhan - 02.06.2010, 06:42
Re: Hey guys. problem over here - by bartje01 - 02.06.2010, 06:45
Re: Hey guys. problem over here - by bartje01 - 02.06.2010, 06:52
Re: Hey guys. problem over here - by DJDhan - 02.06.2010, 07:05

Forum Jump:


Users browsing this thread: 1 Guest(s)