05.01.2012, 17:03
Hey,
Normally I will use a command based asay command however, I was using this when I first started out scripting so I have now decided to change this method to something slightly different which is "#", I am hoping for it to work but before I can test it I would like someone to tell me if it looks okay as I cannot currently test it as my GTA:SA has been broken by someone VERY annoying in my family!
What I would like to find out is if the cases that I use would work and strdel is correct. Thanks!
-Dark
Normally I will use a command based asay command however, I was using this when I first started out scripting so I have now decided to change this method to something slightly different which is "#", I am hoping for it to work but before I can test it I would like someone to tell me if it looks okay as I cannot currently test it as my GTA:SA has been broken by someone VERY annoying in my family!
pawn Код:
public OnPlayerText(playerid,text[])
{
/* if(DisablePlayersCapKeys[playerid])
{
new Text[128];
format(Text,sizeof(Text),"%s",DisableCaps(playerid));
SendClientMessageToAll(GetPlayerColor(playerid),Text);
return 0;
}*/
if(strcmp(text,"#",true,1))
{
new admin;
strdel(text,0,1);
PlayerInfo[playerid][pAdmin] = admin;
new string[128];
switch(admin)
{
case 1: format(string,sizeof(string),"Moderator %s: %s",ReturnPlayerName(playerid));
case 2: format(string,sizeof(string),"Junior Admin %s: %s",ReturnPlayerName(playerid));
case 3: format(string,sizeof(string),"Senior Admin %s: %s",ReturnPlayerName(playerid));
case 4: format(string,sizeof(string),"Head Admin %s: %s",ReturnPlayerName(playerid));
case 1337: format(string,sizeof(string),"Administator Director %s: %s",ReturnPlayerName(playerid));
case 1338: format(string,sizeof(string),"Server Owner %s: %s",ReturnPlayerName(playerid));
}
SendClientMessageToAdmins(COLOR_PURPLE,string);
return 0;
}
return 0;
}
-Dark