25.11.2009, 23:43
In your script search the functions:
SafeGivePlayerMoney
SafeResetPlayerWeapons
SafeGivePlayerWeapon
look at the headers of the functions so for example ill assume the functions are:
copy the SafeGivePlayerWeapon(playerid, weaponid) not the public part or the code inside the { }
and near the top of your script below #include <a_samp> add:
I am assuming that's how the function is don't just copy what i wrote because it might be different
to that inside your script
and near your forwards put:
SafeGivePlayerMoney
SafeResetPlayerWeapons
SafeGivePlayerWeapon
look at the headers of the functions so for example ill assume the functions are:
pawn Код:
public SafeGivePlayerMoney(playerid, money)
{
//Code
}
public SafeResetPlayerWeapons(playerid)
{
}
public SafeGivePlayerWeapon(playerid, weaponid)
{
}
and near the top of your script below #include <a_samp> add:
pawn Код:
forward SafeGivePlayerMoney(playerid, money);
forward SafeResetPlayerWeapons(playerid);
forward SafeGivePlayerWeapon(playerid, weaponid);
to that inside your script
and near your forwards put:
pawn Код:
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
return 0;
}