Some script help
#1

Hello all. This is what i tryd to do:

1. A race script. Race would start every 10 mins, and when it will start in 1 min it will send a message to all. I wanna have a countdown, like 5 4 3... Go! and it should freeze the players when the countdown runs.

2. A admin message like, SendAdminMessage, that will send a message to all online admins.

3. A /report system that would save reports and show em, also /acceptreport and /trashreport, and check reports would be /reports.

I failed at all of those and i deleted everything. Could someone make me that?
Thanks all.

- Markx
Reply
#2

search at WIKI before posting
Reply
#3

Is there any way to display all objects and vehicles?

I didnt find it on wiki -.-
Reply
#4

Mark, you know this isnt a request thread, but. For a race script. Save your pre made races Into a file, load them when its called, and set a timer for every 10 minutes randomly, (im guessing randomly) And a simple countdown script can be found in most modes, Find one, and examine it.

For your sendAdmin message, Just send a formatted text to all Online admins with your Admin variable.

And im clueless on your report system. Sorry.
Reply
#5

For your admin message

pawn Code:
forward AdminMessage(color,const string[]);
public AdminMessage(color,const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(IsAdmin(i))
        {
            SendClientMessage(i, color, string);
        }
    }
    return 1;
}
make sure you edit the IsAdmin(playerid) to the way you detect your admins.
Reply
#6

Man,all is at wiki,or search ******,for report command,its easy,here you got:
On the top of FS
Code:
new LastReport[MAX_PLAYERS];
//OnPlayerCommandText:
Code:
if(strcmp(cmdtext, "/report", true, 7)==0)
{
  if(!strlen(cmdtext[8])) return SendClientMessage(playerid, 0xFF0000AA, "Use /report [message]");
  new str[128];
  if((gettime()-LastReport[playerid]) < 30)
  {
    format(str, 128, "You have to wait %d seconds before you can send a new report!", (30-(gettime()-LastReport[playerid])));
	SendClientMessage(playerid, 0xFF0000AA, str); return 1;
  }
  format(str, 128, "[REPORT] Sender ID: %d. Message: %s", playerid, cmdtext[8]);
  for(new i; i<MAX_PLAYERS; i++){
  if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
    SendClientMessage(i, 0x00FFFFAA, str);
  }}
  SendClientMessage(playerid, 0x00FF00AA, "Report send to online admins!");
  LastReport[playerid] = gettime();
  return 1;
}
Reply
#7

Thanks all, yeah sorry, i shouldnt post it here. i alredy made a SendAdminMessage myself now, thanks anyway. and what about saveing the reports, how to do that? And show em in /reports?
Reply
#8

That's nothing like the report system he wanted. Tha'ts ripped from the wiki..
Reply
#9

So? i'm say already to search on wiki
Reply
#10

Report:
pawn Code:
COMMAND:report(playerid,params[])
{
    new id,reason[64];
    if(sscanf(params,"is[64]",id,reason)) return SendClientMessage(playerid,color_red,"USAGE: /report [playerid] [reason]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,color_red,"Player not connected.");
    new counter = 0;for(new i = 0;i<MAX_PLAYERS;i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(PlayerInfo[i][Level] > 0)
        {
            SendClientMessageEx(i,color_orange,"sssisssisss","Incomming report from ",PlayerInfo[playerid][Username],"(",playerid,") Reporting ",PlayerInfo[id][Username],"(",id,"), Reason: ",reason,".");
            counter++;
        }
    }
    printf("%s has reported %s (Reason:%s)",PlayerInfo[playerid][Username],PlayerInfo[id][Username],reason);
    return SendClientMessageEx(playerid,color_orange,"sis","Your report has been sent to all online administrators (",counter," at the moment).");
}
That saves the report in the serverlogs, to be honest /acceptreport seems a bit unusual to me.

Adminchat:
pawn Code:
COMMAND:a(playerid,params[])
{
    if(PlayerInfo[playerid][Level] < 1) return SendClientMessage(playerid,color_red,"You have no permission to use this command!");
    new text[128];
    if(sscanf(params,"s[128]",text)) return SendClientMessage(playerid,color_red,"USAGE: /a [text]");
    for(new i = 0;i<MAX_PLAYERS;i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(PlayerInfo[i][Level] < 1) continue;
        SendClientMessageEx(i,color_yellow,"ssss","Adminchat: ",PlayerInfo[playerid][Username],": {FFFFFF}",text);
    }
    return 1;
}
Reply
#11

I Know ya did, but if you'r going to post any help, Post somthing he can use, Not somthing he has to completelty remove to make what he needs.
Reply
#12

Well,he can use that
Reply
#13

Not really... Thats the easyest /report ever, i need one that will save reports, maybe with PVar's?
Reply
#14

Gamer posted a better responce, He can atleast use his code. Now, Drop the arguement.
Reply
#15

Yeah, and btw i alredy have a admin chat xD and account system

pawn Code:
enum _PINFO
{
    pKills,
    pDeaths,
    pLevel,
    pWarns,
    pGod,
    pBanned,
    pMuted,
    pJailed,
    pHours,
    pMinutes,
    pSeconds,
    pTotalTime,
    pConnectTime,
    pRegisterDate[28]
}

new PVar[MAX_PLAYERS][_PINFO];
Reply
#16

I can't help,sry
Reply
#17

Okay, i got another question.

Maybe some of you know in ladmin, it shows to the owners (level 6) what a player tipes, like "Player bla tiped "/blabla"." but only if there is a '/', and enable & disable that, how to make that?
Reply
#18

How'd about to post your all questions on ****** or wiki?
Reply
#19

Quote:
Originally Posted by [DJ]Boki
View Post
How'd about to post your all questions on ****** or wiki?
Why the fuck are you posting if you dont want to help me? You think i didnt try that? Cmon, show me the results of your search! I wanna see how you found it and i didnt.
Reply
#20

Okay,give me some script,i will find it
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)