SA-MP Forums Archive
..:: /credits command::.. ?? - 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: ..:: /credits command::.. ?? (/showthread.php?tid=279328)



..:: /credits command::.. ?? - Ammo - 26.08.2011

how to make /credits command and some tretx commands like /rules /founders ......


Re: ..:: /credits command::.. ?? - knackworst - 26.08.2011

Code:
      if(strcmp("/credits", cmdtext, true) == 0)
   {
   SendClientMessage(playerid, COLOR_RED, "List server credits");
   SendClientMessage(playerid, COLOR_YELLOW, "Server owner: [TI]knackworst");
   SendClientMessage(playerid, COLOR_YELLOW, "Server Hoster: Nightdarkness");
   SendClientMessage(playerid, COLOR_YELLOW, "Server Scripters: knackworst, Libra and Nightdarkness");
   SendClientMessage(playerid, COLOR_YELLOW, "Server Site Maker: Nightdarkness and Knackworst");
   SendClientMessage(playerid, COLOR_YELLOW, "Server Site: http://www.stuntacular.smffy.com/");
   SendClientMessage(playerid, COLOR_YELLOW, "Server Mappers: Sam, [SU]iHateLolypops, knackworst ,Libra, Isus and Nightdarkness");
   SendClientMessage(playerid, COLOR_YELLOW, "Server IRC Chat Maker: Sam");
   SendClientMessage(playerid, COLOR_YELLOW, "Server IRC Chat: www.tirc.tk");
   SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
   SendClientMessage(playerid, COLOR_GREEN, "Without these people this server wouldn't have been successful. (scroll up for all the messages!)");
   return 1;
   }
here's an example
put it in between:

OnPlayerCommandText
{
'put the code I sent u here'
return 0;
}

Now all you have to do is change my lines and write stuff u want

about the functions used:

https://sampwiki.blast.hk/wiki/OnPlayerCommandText
https://sampwiki.blast.hk/wiki/SendClientMessage


Re: ..:: /credits command::.. ?? - Amel_PAtomAXx - 26.08.2011

pawn Code:
if(strcmp(cmdtext,"/credits",true)== 0)
{
    SendClientMessage(playerid,0xFFFFFFFF,"--------------------- CERDITS ----------------------");
    SendClientMessage(playerid,0xFF0000FF,"-- Server Owner : TheRockstar");
    SendClientMessage(playerid,0xFF0000FF,"-- Server Scripter : name");
    SendClientMessage(playerid,0xFF0000FF,"-- Server Mapper : name");
    SendClientMessage(playerid,0xFFFFFFFF,"-----------------------------------------------------");
    return 1;
}
etc...
pawn Code:
if(strcmp(cmdtext,"/rules",true)== 0)
{
    SendClientMessage(playerid,0xFF0000FF,"Do not cheat here!"); // and something like that
    return 1;
}



Re: ..:: /credits command::.. ?? - Kingunit - 26.08.2011

Quote:
Originally Posted by knackworst
View Post
Code:
      if(strcmp("/credits", cmdtext, true) == 0)
   {
   SendClientMessage(playerid, COLOR_RED, "List server credits");
   SendClientMessage(playerid, COLOR_YELLOW, "Server owner: [TI]knackworst");
   SendClientMessage(playerid, COLOR_YELLOW, "Server Hoster: Nightdarkness");
   SendClientMessage(playerid, COLOR_YELLOW, "Server Scripters: knackworst, Libra and Nightdarkness");
   SendClientMessage(playerid, COLOR_YELLOW, "Server Site Maker: Nightdarkness and Knackworst");
   SendClientMessage(playerid, COLOR_YELLOW, "Server Site: http://www.stuntacular.smffy.com/");
   SendClientMessage(playerid, COLOR_YELLOW, "Server Mappers: Sam, [SU]iHateLolypops, knackworst ,Libra, Isus and Nightdarkness");
   SendClientMessage(playerid, COLOR_YELLOW, "Server IRC Chat Maker: Sam");
   SendClientMessage(playerid, COLOR_YELLOW, "Server IRC Chat: www.tirc.tk");
   SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
   SendClientMessage(playerid, COLOR_GREEN, "Without these people this server wouldn't have been successful. (scroll up for all the messages!)");
   return 1;
   }
here's an example
put it in between:

OnPlayerCommandText
{
'put the code I sent u here'
return 0;
}

Now all you have to do is change my lines and write stuff u want

about the functions used:

https://sampwiki.blast.hk/wiki/OnPlayerCommandText
https://sampwiki.blast.hk/wiki/SendClientMessage
Didn't you ripped that outta gamemode?
Here is also a example ZCMD:

pawn Code:
CMD:credits(playerid, params[])
{
    SendClientMessage(playerid,COLOR_WHITE, ".:: Credits ::.");
    SendClientMessage(playerid,COLOR_WHITE, "This script is made by Kingunit.");
    SendClientMessage(playerid,COLOR_WHITE, "He just bought a new dildo yesterday");
    // Go on with those SendClientMessage's
    return 1;
}



Re: ..:: /credits command::.. ?? - knackworst - 26.08.2011

Quote:
Originally Posted by Kingunit
View Post
Didn't you ripped that outta gamemode?
Here is also a example ZCMD:
Yes I ripped it outa my selfmade gamemode... I think that's legal -_-


Re: ..:: /credits command::.. ?? - PhoenixB - 26.08.2011

Simple really, just using SendClientMessage with a little bit of colour. Here is an Example via STRCMP and ZCMD

ZCMD method:
pawn Code:
CMD:credits(playerid, params[]) // NOTE: You will need ZCMD include.
{
    SendClientMessage(playerid, COLOURCODE_HERE(or HEX), "Type in here things such as I own this server");
    return 1;
}

// And just copy the SendClientMessage Line and paste it above your return 1;
STRCMP Method:
pawn Code:
if(strcmp("/credits", cmdtext, true) == 0) // Under OnPlayerCommandText
{
    SendClientMessage(playerid, COLOURCODE_HERE(or HEX), "Type in here things such as I own this server");
    return 1;
}

// And just copy the SendClientMessage Line and paste it above your return 1;



Re: ..:: /credits command::.. ?? - Shouty - 25.06.2012

Better...


Code:
if(strcmp("/credits", cmdtext, true) == 0) // Under OnPlayerCommandText
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Credits","Server Owner: Blah Blah\nServer Scripter : Blah blah\nServer Mapper: Blah blah","Ok","Exit"); 
return 1;
}



Re: ..:: /credits command::.. ?? - Kindred - 25.06.2012

Why in the hell did you update a one year old thread?

Code:
This forum requires that you wait 120 seconds between posts. Please try again in 26 seconds.



Re: ..:: /credits command::.. ?? - AlonGlenn - 27.11.2016

Thanks