/search - 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: /search (
/showthread.php?tid=388213)
/search -
[MM]18240[FMB] - 27.10.2012
I want to make something to where if someone dies, you have 30 seconds to /search them, and you can find a random percentage of their cash, and any weapons they have. And I want it to have a coffin floating above where they died so the person can resume gameplay. How could I do this? Examples?
Re: /search -
Rodney Francalim - 28.10.2012
SetTimerEx and basic mathematics (percentage)
Re: /search -
[MM]18240[FMB] - 28.10.2012
Can I get an example? I don't understand the HOW, I just know what I want...
Re: /search -
[MM]18240[FMB] - 28.10.2012
Oh, yeah, and I want this to be able to go into a GM, not a FS
Re: /search -
Lordzy - 28.10.2012
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
SetTimerEx("StopTimer",YOURTIME,false,"d",playerid); //Change the 'YOURTIME' to your specified time in milliseconds.
//Your other functions.
return 1;
}
public StopTimer(playerid);
public StopTimer(playerid)
{
SpawnPlayer(playerid); //Spawns player after specified time ends.
return 0;
}
Edit:That's kinda new style I found from topic 'Today I learned' posted by '******'.
But if I've done wrong, please use the below snippet.
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
SetTimerEx("StopTimer",YOURTIME,false,"d",playerid); //Change the 'YOURTIME' to your specified time in milliseconds.
//Your other functions.
return 1;
}
forward StopTimer(playerid);
public StopTimer(playerid)
{
SpawnPlayer(playerid); //Spawns player after specified time ends.
return 1;
}
Re: /search -
[MM]18240[FMB] - 01.11.2012
Wait, what? Can you give me an example of how to make the search function? That is the part I am confused on...
Re: /search -
[MM]18240[FMB] - 12.11.2012
Also, I use MySQL, could it be incorporated to use MySQL?