can someone correct this setpvar thing? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: can someone correct this setpvar thing? (
/showthread.php?tid=335293)
can someone correct this setpvar thing? -
Andy_McKinley - 17.04.2012
i have 4 errors when i have this code.
pawn Код:
else if(pickupid == comb)
{
weapon[playerid] = 27;
weaponcost[playerid] = 1200;
ammo2[playerid] = 210;
TextDrawShowForPlayer(playerid, background);
#if defined ALT
TextDrawSetString(text2, "Use 'ALT' to buy. Cost $1200.");
#else
TextDrawSetString(text2, "Use 'ALT' to buy. Cost $1200.");
#endif
TextDrawShowForPlayer(playerid, text2);
wpicked[playerid] = 1;
SetTimerEx("HideText", 2000, false, "d", playerid);
SetPVarInt(playerid,"comb", GetPVarInt(playerid,"comb")7); // Adds 7 "Ammo" to the PVar which is checked when the AC checks for this weapon
}
i never used pvar before, so can someone help me out here?
Re: can someone correct this setpvar thing? -
Scenario - 17.04.2012
pawn Код:
GetPVarInt(playerid,"comb")+7
Re: can someone correct this setpvar thing? -
Andy_McKinley - 17.04.2012
Quote:
Originally Posted by RealCop228
pawn Код:
GetPVarInt(playerid,"comb")+7
|
thanks man!