SA-MP Forums Archive
i got few questions... - 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: i got few questions... (/showthread.php?tid=73070)



i got few questions... - krisis32 - 12.04.2009

1.st one.

How to make a megaphone for cops?

like this one:

pawn Код:
if( !strcmp(cmdtext, "/mp", true, 3) ) // 3 is the length of /me
{

    new str[256], pname[256];
    GetPlayerName(playerid, pname, 256);
    format(str, 256, "(Officer %s: %s )", pname, cmdtext[4]);
    SendClientMessageToAll(COLOR_BLUE, str);
  if (gTeam[playerid] == TEAM_COP)
  return SendClientMessage(playerid,COLOR_RED,"!!You aren't a cop!!");
}
This isnt good for me beacouse i got same /me command!

When i do /me bla bla bla .. it shows

Krisis32 bla bla bla
Officer Krisis32: bla bla bla

So this dosnt work for me... if any one could tell whats the problem it would be awesome!

2nd.

Is it possable to make a money credite service?

Whne you enter the bank and press /getmoney [ammount] [how moch time you need to re-pay it]

The time will count only when u play the game...

3rd.

I need a command like /crime [name] [what did he do]

and it would save it in file:

[name]:
[time reported]
[what did he do]
[reporter]
--------------------


Re: i got few questions... - Lazarus - 12.04.2009

I can fix the first one:

pawn Код:
if(strcmp(cmdtext, "/mega", true, 5) == 0)
{
    if(gTeam[playerid] != TEAM_COP) return SendClientMessage(playerid, COLOR_RED, "You are not a cop");
    if(strlen(cmdtext[6]) == 0) return SendClientMessage(playerid, COLOR_RED, "Usage: /mega [msg]");

    new str[128], pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(str, sizeof(str), "Officer %s: %s", pname, cmdtext[6]);
    SendClientMessageToAll(COLOR_BLUE, str);
    return 1;
}
Two takes testing so I wont bother with that, and with three, do you know how to use scriptfiles? Even if you did get a script like that, would you know how to use it?


Re: i got few questions... - krisis32 - 12.04.2009

about 3rd one.. um.. i did have somthing like that on my old servers version.. but new server is rescripted and now i am making new version of it... old one did gone cuz my old crappy pc did broke... so.....
I dont remember the name of FS i did have....


Re: i got few questions... - krisis32 - 12.04.2009

1st one SLOVED:

LEFT:

2nd
3rd