04.02.2012, 23:42
pawn Код:
stock GiveWeapon(playerid,weapon,ammo)
{
new str[10];
format(str,sizeof(str),"weap%d",weapon); //format to set the variable
SetPVarInt(playerid,str,1); //the script now know that the player has had this weapon
format(str,sizeof(str),"wslot%d",GetWeaponSlot(weapon)); //what weapon is in which slot
SetPVarInt(playerid,str,weapon);
GivePlayerWeapon(playerid,weapon,ammo);
}

But the give weapon stock is the same i think?
The main reason why i want to convert this to normal variables is that i want only to reset the players weapons if he cheated them. (and not kick him)
I know how it works with normal variables (cause i have to reset them after punishment) but i dont know how to do it with pvars as pvars as far as i know are only resettet after a player disconnects.
Could you provide me an example?
That would be sooo awesome, please
