SA-MP Forums Archive
Giving the drugs to player - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Giving the drugs to player (/showthread.php?tid=156578)



Giving the drugs to player - SisasPoiss - 23.06.2010

how can i make so that if player types a command in certain place, he will be freezed 10second, and he will get etc 10 drugs

Still Larp script



Re: Giving the drugs to player - Joe_ - 23.06.2010

IsPlayerInRangeOfPoint

GetTickCount


Re: Giving the drugs to player - SisasPoiss - 23.06.2010

Quote:
Originally Posted by Joe_
IsPlayerInRangeOfPoint

GetTickCount
Still didnt get that, how that player will get the drugs

Command is /smuggledrugs
Cords are 1296.9116,-979.6759,32.6953


Re: Giving the drugs to player - Joe_ - 23.06.2010

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 5.0, 1296.9116,-979.6759,32.6953)
{
TogglePlayerControllable(playerid, false);
SetTimerEx("GiveDrugs", 10000, 0, "i", playerid);
return 1;
}
return 1;
pawn Код:
public GiveDrugs(playerid)
{
TogglePlayerControllable(playerid, true);
//I do not know your drug array, so I will just use an example.
pData[playerid][Drugs] += 1;
return 1;
}
Sorry, I missunderstood if it was a command or check, so you can't use GetTickCount.

This uses a timer lol.

Place the top code in your command, and the bottom code outside any callbacks.