Roleplay command for id system example - 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: Roleplay command for id system example (
/showthread.php?tid=114955)
Roleplay command for id system example -
JoeDaDude - 21.12.2009
Hello,
Not long back my mate told me a rp command that was a VERY easy example for id system.
I cant remember what that command was, Does anyone know what it is,
Like /heal or something, Just an easy example for an id system,
Like, to create a /heal that everyone can use but runs on id,
Like /heal [id] and anyone can use it, Or can anyone tell me the full code of an id system,
But with nothing in it, Like it dosent do anything, Its just an id system code, Thanks
Re: Roleplay command for id system example -
Striker_Moe - 21.12.2009
Sure thing.
Just create a /heal command like for yourself. (playerid)
If youґre done with that, add this to the command:
Код:
new targetid = strval(params);
And targetid will be the ID you type in.
Hereґs a very simple example:
pawn Код:
if(strcmp(cmdtext, "/heal", true, 5) == 0) // '/heal'
{
new targetid = strval(params);
SetPlayerHealth(targetid,100);
return 1;
}
Re: Roleplay command for id system example -
JoeDaDude - 21.12.2009
Is that it?
Re: Roleplay command for id system example -
JoeDaDude - 21.12.2009
someone delete