SA-MP Forums Archive
playerid commands - 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: playerid commands (/showthread.php?tid=406259)



playerid commands - Riggster - 09.01.2013

Can anyone show me what I would put in my script to make a command effect a player like /taze [playerid]
I cant find help for this on the forums if you can please give me a link otherwise please show me how to do it in the comments


Re: playerid commands - Fabio11 - 09.01.2013

Use this https://sampforum.blast.hk/showthread.php?tid=91354

For taze just freeze the target id if he's near the cop. If you can't understand that, then you need to view a few tutorials before starting scripting.


Re: playerid commands - LetsOWN[PL] - 09.01.2013

Hello.
All you need is zcmd, sscanf, time and good ideas.
There are a lot of examples everywhere.

Here's a little sample i wrote on my own.
pawn Код:
COMMAND:dosomething(playerid, params[])
{
new id;
if(!sscanf(params, "u", id))
{
    SendClientMessage(playerid, 0xFF0000FF, "USAGE: /dosomething [playerid]");
    return 1;
}

if(id == INVALID_PLAYER_ID)
    SendClientMessage(playerid, 0xFF0000FF, "There is no such player :]");
    return 1;
}

// Do something for player with ID 'id'.. Basically.. You can do WHATEVER :D
return 1;
}
Easy, isn't it?

Greetz,
LetsOWN



Re: playerid commands - Riggster - 09.01.2013

Thanks for the help guys