Can Anyone Help me script?
#1

Hello i am scripting a RP server and i need help.

i need some cop faction commands which is /su(spect),/cuff,/r(adio),/jail [playerid] [time] no longer than 120 secs

and a cop rank like cadet,Swat and FBI

and then for a medic which is just /heal and /r


and the last thing i want is whenever a new player Join his team should be a civilian which is TEAM_CIV

please guys i really need help and i promise i will add whoever helps me in this script in my server credits

Thanks in Advance for help
Reply
#2

Why don't you think about it yourself? but ok i will help you with one:
/r
I am using ocmd:
Код:
ocmd:r (playerid,params[])
{
      new text[128];
      if(sscanf(params,"s",text))return SendClientMessage(playerid,COLOR_BLUE,"/r [text] - for radio chat");
      format(text,sizeof(text),"Radia: %s: %s",UserName(playerid),text); //UserName don't know your command
      for(new i=0; i<GetMaxPlayers(); i++)
      {
             if(IsPlayerConnected(i))
             {
                   if(isPlayerInFrakt(i,GetPVarInt(playerid,"faction")))
                   {
                         SendClientMessage(i,COLOR_WHITE,text);
                   }
             }
      }
      return 1;
}
NOTE: This is compatible with my script probably not with yours you have to edit it
Reply
#3

....
Reply
#4

You should download something like ocmd and include it to your script:
zcmd
dcmd
ocmd
something like it

And about strcmp:
I found this with ******:
Код:
if(!strcmp(cmdtext, "/r", true))
{
        new string[128], Player[MAX_PLAYER_NAME];
        GetPlayerName(playerid, Player, MAX_PLAYER_NAME);
        format(string, 128, "Radio: %s: %s", Player, cmdtext[2]);
        for(new i=0; i<MAX_PLAYERS; i++) 
        {
               if(IsPlayerConnected(i))
               {
                      if(gTeam[i] == TEAM_COP)
                      {
                            SendClientMessage(i,COLOR_LIGHBLUE,string);
                      }
               }
        }
        return 1;
}
I have never done it like this out maybe its working
Reply
#5

i guess the code is right but when i do /r test it says SERVER: Unknown command,and when i do /r it says Radio[TwisT]:

can anyone help me?
Reply
#6

i would recommend you downloading one of the includes i send you: with them its much easier and better
and then you can use my first code its working fine
Reply
#7

ok

can you tell me how to use dcmd?

as i said i am new in scripting
Reply
#8

i need a small help

look a player did /duty and he goes in cop skin,and when he chooses in the dialog to go off duty i want his skin back to what it was before going on duty


can any one help me in this one?
Reply
#9

Please i need Help!!!
Reply
#10

pawn Код:
if(gTeam[playerid] == TEAM_CIV)
{
SetPlayerSkin(playerid,274);
SendClientMessage(playerid,COLOR_PINK2,"Welcome to duty");
}
else return SendClientMessage(playerid, 0xFF0000AA, "You can't go on duty!"); //You can replace 0xFF0000AA with COLOR_RED etc.
Sorry, but this is all I can do to make your life easier, alot of people wouldn't be interested in creating a whole script for you. Try posting in the Script Request Thread.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)