playerid commands
#1

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

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

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

Thanks for the help guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)