SA-MP Forums Archive
How can i make a /rights ID? - 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: How can i make a /rights ID? (/showthread.php?tid=149649)



How can i make a /rights ID? - nielsbon1 - 22.05.2010

Hey guy's

I got a question i'm new at scripting.
So i dont know this.

I want to make a command for police to tell the guy his rights.
But i dont know how i viewed Sa-mp wiki and ******* already.
Who can help me?


Re: How can i make a /rights ID? - Bayler - 22.05.2010

SendClientMessage(id,COLOR_SHITBROWN,"--------------- Miranda Warning ---------------");
SendClientMessage(id,COLOR_SHITBROWN,"You Have the Right to Keep your Fat Face Shut");
SendClientMessage(id,COLOR_SHITBROWN,"You Have the Right to NOT Drop the Soap where your getting ready to go");
SendClientMessage(id,COLOR_SHITBROWN,"You have the Right to An Attorney but only after I Rodney King your ass");

Just simply duplicate a command from your GM, with what ever perms a cop has and send SendClientMessage


Re: How can i make a /rights ID? - nielsbon1 - 23.05.2010

Yeah but then it send it to everyone in the server.
I want just like /Rights ID < The id to send it to


Re: How can i make a /rights ID? - Kayaque - 23.05.2010

Код:
dcmd_rights(playerid, params[]);
{
if(IsPlayerCop(playerid)==1) // or whatever function you got on the police..
{
if(sscanf(params, "u", id)) return SendClientMessage(playerid, InsertColorCode, "Usage: /rights (playerid)");
SendClientMessage(id, COLOR, "Your rights: bla bla bla bla");
SendClientMessage(id, COLOR, " rights continue bla bla bla");
}
else
{
SendClientMessage(playerid, COLOR, "ERROR: You are not an police officer.");
}
return 1;
}
Something like that



Re: How can i make a /rights ID? - airsoftglock - 23.05.2010

Quote:
Originally Posted by KayaQue
Код:
dcmd_rights(playerid, params[]);
{
if(IsPlayerCop(playerid)==1) // or whatever function you got on the police..
{
if(sscanf(params, "u", id)) return SendClientMessage(playerid, InsertColorCode, "Usage: /rights (playerid)");
SendClientMessage(id, COLOR, "Your rights: bla bla bla bla");
SendClientMessage(id, COLOR, " rights continue bla bla bla");
}
else
{
SendClientMessage(playerid, COLOR, "ERROR: You are not an police officer.");
}
return 1;
}
Something like that
yea like that what im guessing its a cNr


Re: How can i make a /rights ID? - nielsbon1 - 23.05.2010

No it's a roleplay own made .
But it gives me allot off errors. edited the command to correct stuff but still gives me errors

Код:
C:\Users\Niels\Desktop\Scipt1\gamemodes\Im2sz.pwn(8498) : error 004: function "dcmd_rights" is not implemented
C:\Users\Niels\Desktop\Scipt1\gamemodes\Im2sz.pwn(26340) : error 055: start of function body without function header
C:\Users\Niels\Desktop\Scipt1\gamemodes\Im2sz.pwn(26341) : error 010: invalid function or declaration
C:\Users\Niels\Desktop\Scipt1\gamemodes\Im2sz.pwn(26343) : error 010: invalid function or declaration
C:\Users\Niels\Desktop\Scipt1\gamemodes\Im2sz.pwn(26347) : error 010: invalid function or declaration
C:\Users\Niels\Desktop\Scipt1\gamemodes\Im2sz.pwn(26351) : error 010: invalid function or declaration
C:\Users\Niels\Desktop\Scipt1\gamemodes\Im2sz.pwn(22477) : warning 204: symbol is assigned a value that is never used: "roadblocktimer"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.



Re: How can i make a /rights ID? - Kayaque - 24.05.2010

I see you're not familiar with dcmd..

You need this in the top of your script
Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
also, you need this;

dcmd(rights, 6, cmdtext)

under public OnPlayerCommandText(playerid, cmdtext[])


Re: How can i make a /rights ID? - Kayaque - 24.05.2010

nielsbon1, did it work? Case solved?