#include <a_samp>
#include <zcmd>
#define Munka_Favago 1
CMD:favago(playerid, params[])
{
SetPVarInt(playerid, \"Favago\", Munka_Favago);
SendClientMessage(playerid, 0x33CCFFAA, \"Favágó lettél!\");
return 1;
}
CMD:fakivagas(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 2428.5974,-139.4831,31.4704) || IsPlayerInRangeOfPoint(playerid, 2.0, 2403.0400,-139.5483,28.8782) || IsPlayerInRangeOfPoint(playerid, 2.0, 2431.5042,-167.3200,27.6910) || IsPlayerInRangeOfPoint(playerid, 2.0, 2435.1577,-152.6501,31.3709))
{
if(GetPVarInt(playerid, \"Favago\") == Munka_Favago)
{
TogglePlayerControllable(playerid, 0);
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid, 0xFF0000AA, \"Elkezdted kivágni a fát, és a fejsze élezésért $100-t fizettél!\");
SetTimerEx(\"favagas\",10000,0,\"i\",playerid);
}
}
return 1;
}
forward favagas(playerid);
public favagas(playerid)
{
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, 0x33CCFFAA, \"Befejezted a favágást! Kaptál $745-t, és 10 pontot!\");
GivePlayerMoney(playerid, 1200);
SetPlayerScore(playerid,GetPlayerScore(playerid)+10);
return 1;
}
Tessék!
Ami az \'IsPlayerInRangeOfPoint-nál van kordináta, azt cseréld ki, neked megfelelõen.