Код:
forward MoneyPickup1();
public MoneyPickup1()
{
new string[128], moneyamount = 1000);
GivePlayerMoney(playerid, moneyamount);
format(string, sizeof(string), "You have robbed $%i.", moneyamount);
SendClientMessage(playerid, 0xFFFFFFF, string);
return 1;
}
Place this after the OnPlayerCommandText or anywhere.
Код:
CMD:robpickup1(playerid, params[])
{
SetTimerEx("RobbingSystem", 45000, false, "i", playerid);
GameTextForPlayer(playerid, "Robbing", 4500, 3);
return 1;
}
For Pickup 2
Код:
forward MoneyPickup2();
public MoneyPickup2()
{
new string[128], moneyamount = 2000);
GivePlayerMoney(playerid, moneyamount);
format(string, sizeof(string), "You have robbed $%i.", moneyamount);
SendClientMessage(playerid, 0xFFFFFFF, string);
return 1;
}
Place this after the OnPlayerCommandText or anywhere.
Код:
CMD:robpickup2(playerid, params[])
{
SetTimerEx("RobbingSystem", 45000, false, "i", playerid);
GameTextForPlayer(playerid, "Robbing", 4500, 3);
return 1;
}
For pickup3
Код:
forward MoneyPickup3();
public MoneyPickup3()
{
new string[128], moneyamount = 3000);
GivePlayerMoney(playerid, moneyamount);
format(string, sizeof(string), "You have robbed $%i.", moneyamount);
SendClientMessage(playerid, 0xFFFFFFF, string);
return 1;
}
Place this after the OnPlayerCommandText or anywhere.
Код:
CMD:robpickup3(playerid, params[])
{
SetTimerEx("RobbingSystem", 45000, false, "i", playerid);
GameTextForPlayer(playerid, "Robbing", 4500, 3);
return 1;
}
All you need to do is to create this three pickups
AddStaticPickup(1212, "Here add the coordinates where you want the Pickup to be created" );
AddStaticPickup(1212, "Here add the coordinates where you want the Pickup to be created" );
AddStaticPickup(1212, "Here add the coordinates where you want the Pickup to be created" );
To take the coordinates use /save
And you will need to set the coordinates where you want the command to be used.
if(IsPlayerInRangeOfPoint(playerid, "Here add the coordinate where you want the command to be used" );
Its too simple if you still cant understand it check this link:
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint