[Help]Scripting - 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: [Help]Scripting (
/showthread.php?tid=568283)
[Help]Scripting -
RenHaki - 21.03.2015
Hi I want to add this system where player dig a certain place but they need to buy shovel. They will get items like money and stuff. Similar to this one:
if(strcmp(cmd,"/dig",true)==0)
{
if(PlayerToPoint(10, playerid,-1505.4954,1374.2258,3.8537))
{
if(IsPlayerConnected(playerid))
{
new amen = 1 + random (5);
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " get out of the car first");
return 1;
}
if(SpamAmen[playerid] >= MAX_SPAM)
SpamAmen[playerid] += 900;
if(IsPlayerConnected(playerid))
{
if(amen == 1)
{
GivePlayerWeapon(playerid, 31, 100);
SendClientMessage(playerid, 0x8DC90FF, " found m4");
GetPlayerName(playerid, sendername, sizeof(sendername));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
return 1;
}
Re: [Help]Scripting -
fuckingcruse - 21.03.2015
If you can translate it in english , we can help you dude