Message For play, after ban.
#1

Alright, so, I want it to be able to tell the player something when they get banned, like RRP Does (Redgie's Roleplay), But How would I put it like that?
Reply
#2

Do you have a picture buddy? If you can supply me one i can help you
Reply
#3

Quote:
Originally Posted by Ryan.M
Do you have a picture buddy? If you can supply me one i can help you
Eh.. No pic? after u /ban someone, they get a message of saying blah blah blah? saying there banned and take a screen or something?
Reply
#4

Quote:
Originally Posted by Seif_
Send a message before you do Ban().
I found that if you do SendClientMessage, then Ban immediately, it didnt show, so i delay the Ban() portion for 500ms. Works perfect.
Reply
#5

I put messages...
Errors.:
Quote:

C:\Users\Meagan\Desktop\samp02Xserver.win32\gamemo des\WC-RP.pwn(17895) : warning 217: loose indentation
C:\Users\RoflCopter\Desktop\samp02Xserver.win32\ga memodes\WC-RP.pwn(18390) : error 035: argument type mismatch (argument 2)
C:\Users\Meagan\Desktop\samp02Xserver.win32\gamemo des\WC-RP.pwn(18391) : error 035: argument type mismatch (argument 2)
C:\Users\Meagan\Desktop\samp02Xserver.win32\gamemo des\WC-RP.pwn(18392) : error 035: argument type mismatch (argument 2)
C:\Users\Meagan\Desktop\samp02Xserver.win32\gamemo des\WC-RP.pwn(18393) : error 035: argument type mismatch (argument 2)
C:\Users\Meagan\Desktop\samp02Xserver.win32\gamemo des\WC-RP.pwn(18394) : error 035: argument type mismatch (argument 2)
C:\Users\Meagan\Desktop\samp02Xserver.win32\gamemo des\WC-RP.pwn(18395) : error 035: argument type mismatch (argument 2)


Ban Code:
Quote:

if(strcmp(cmd, "/ban", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ban [playerid/PartOfName] [reason]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ban [playerid/PartOfName] [reason]");
return 1;
}
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "Admin: %s was banned by %s, reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
BanLog(string);
format(string, sizeof(string), "Admin: %s was banned by %s, reason: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
PlayerInfo[giveplayerid][pAdmin] = PlayerInfo[giveplayerid][pLevel];
PlayerInfo[giveplayerid][pLevel] = -999;
SendClientMessage(COLOR_GREEN, "*****__Your banned!__*****");
SendClientMessage(COLOR_RED, "Admin: $s had banned you, reason: %s",giveplayer, (result));
SendClientMessage(COLOR_YELLOW, "If you feel that you been banned wrongfuly, take a screenshot");
SendClientMessage(COLOR_YELLOW, "And make a unban request at the forums with the screen shot");
SendClientMessage(COLOR_YELLOW, "Post it at: Lias-rp.forumotion.net, and make sure you use the right format!");
SendClientMessage(COLOR_GREEN, "****Intill then, see you later %s!***", giveplayer);
Ban(giveplayerid);
return 1;
}
}//not connected
}
else
{
format(string, sizeof(string), " %d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}

Im so newbie at scripting
Reply
#6

comment the lines that are having problems. We dont know which line is which.
Reply
#7

Quote:
Originally Posted by Lia
pawn Код:
SendClientMessage(COLOR_GREEN, "****Intill then, see you later %s!***", giveplayer);
Im so newbie at scripting
u got Untill wrong
well that wont help ur warnings but ye
u need to tell us which are the lines wit the warnings
and next time better use
:]
Reply
#8

the correct format is
pawn Код:
SendClientMessage(playerid,Color,"Blah blah");
Reply
#9

Quote:
Originally Posted by Lia
pawn Код:
SendClientMessage(COLOR_GREEN, "****Intill then, see you later %s!***", giveplayer);
In order to do things like this, you have to use format...

pawn Код:
new string[128];
        format(string,sizeof(string),"****Until then, See you later %s!****",giveplayer);
        SendClientMessage(COLOR_GREEN, string);
You dont need to recreate a new array everytime, just make one, format, send message, format, send message and so on.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)