Giving the drugs to player
#1

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
Reply
#2

IsPlayerInRangeOfPoint

GetTickCount
Reply
#3

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
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)