Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Server sided money(points) help.

$
0
0
So I've custom money system(called points),

So what I've tried to do is create a weapon shop dialog, the only problem I have is this!


Code:

C:\Users\yan\Desktop\LS DM\gamemodes\DBv1.pwn(1653) : error 017: undefined symbol "GetPlayerPoints"
C:\Users\yan\Desktop\LS DM\gamemodes\DBv1.pwn(1657) : error 017: undefined symbol "GivePlayerPoints"
Pawn compiler 3.2.3664                          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

Code:

stock SellWeapon(playerid, points, weapon, ammo)
{
  new ppoints = GetPlayerPoints(playerid);
  if(ppoints>points)
  {
          new string[80], weaponname[32];
          GivePlayerPoints(playerid, -points, pInfo[playerid][Points]);
          GivePlayerWeapon(playerid, weapon,ammo);
          GetWeaponName(weapon, weaponname, sizeof(weaponname));
          format(string, sizeof(string), "{c3c3c3}(SHOP) You have bought %s with %i ammo for %i points", weaponname, ammo, points);
          return SendClientMessage(playerid, -1, string);
  }
  else return SendClientMessage(playerid, -1,"You don't have enough points");
}

How do I get the player points correctly? (and set it of course)

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>