..:: /credits command::.. ??
#1

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

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

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

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;
}
Reply
#5

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 -_-
Reply
#6

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

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;
}
Reply
#8

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

Thanks
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)