Posts: 12
Threads: 7
Joined: Nov 2013
Reputation:
0
Well hello there, i've been trying to write a ban command, and i've seen threads about them on this website, but most don't work when i've rewritten them, i was wondering if anyone could help me make one, if so, can you help me with the /ban <ID> <reason> and also saving the ban in a folder? Thanks for the help (Im new at scripting sorry :S)
Posts: 1,733
Threads: 187
Joined: Oct 2014
Reputation:
0
Search on ******.
There is tons of tutorials.
Posts: 99
Threads: 26
Joined: Jun 2014
Quote:
Originally Posted by KyLeBlaK
Most of the tutorials don't work
And thank you Gurmani11, but i don't seem to get it to work D: +rep
|
You can not REP People yet. You need 50 posts to be able to do that.
Quote:
Originally Posted by gurmani11
pawn Код:
CMD:ban(playerid, params[]) { new id,reason[64], str[128]; if(sscanf(params, "us[64]", id,reason))return SendClientMessage(playerid, COLOR_RED, ">>Error: USAGE: /Ban [ID] [Reason]"); if(id == playerid) return SendClientMessage(playerid, COLOR_RED, ">>Error: Huh!"); if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLOR_RED, ">>Error: Player is not connected!"); format(str, sizeof(str), ">>Action: %s has been banned by an administrator %s. >>Reason: %s", pName(id), pName(playerid), reason); SendClientMessageToAll(-1, str); GameTextForPlayer(id, "~r~You have been banned!", 5000, 4); Ban(id); printf("Ban: %s Has Been Banned By %s, Reason: %s",pName(id), pName(playerid),reason); return 1; }
|
There is an issue when you try to compile it.
pawn Код:
C:\Users\PhantoM21\Desktop\Cops and Robbers\filterscripts\Register.pwn(219) : error 017: undefined symbol "pName"
C:\Users\PhantoM21\Desktop\Cops and Robbers\filterscripts\Register.pwn(223) : error 017: undefined symbol "pName"
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
Good luck with this actually doing anything useful.