OOC Toggle Help - 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)
+--- Thread: OOC Toggle Help (
/showthread.php?tid=374558)
OOC Toggle Help -
zT KiNgKoNg - 03.09.2012
Basically when im level 5 it works but if im level 0 its doesn't like it should but the message at the bottom isn't showing
pawn Код:
CMD:ooctoggle(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
if(oocstatus == 0){
oocstatus = 1;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Disabled By An Administrator");
}
else if(oocstatus == 1){
oocstatus = 0;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Enabled By An Administrator");
}
else
{
return SendClientMessage(playerid,KNOWNCOLOR_ORCHID,"Your Not The Correct Level To Use This Commend");
}
}
return 1;
}
Re: OOC Toggle Help -
denNorske - 03.09.2012
Try this:
pawn Код:
CMD:ooctoggle(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
if(oocstatus == 0){
oocstatus = 1;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Disabled By An Administrator");
}
else if(oocstatus == 1){
oocstatus = 0;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Enabled By An Administrator");
}
else
{
SendClientMessage(playerid,KNOWNCOLOR_ORCHID,"Your Not The Correct Level To Use This Commend");
}
}
return 1;
}
If it doesnt work, tell me.
Re: OOC Toggle Help -
Luke_James - 03.09.2012
Probably because you haven't indented it at all, I'll do it and get back to you.
pawn Код:
CMD:ooctoggle(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
if(oocstatus == 0){
oocstatus = 1;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Disabled By An Administrator");
}
else
{
if(oocstatus == 1){
oocstatus = 0;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Enabled By An Administrator");
}
else return SendClientMessage(playerid,KNOWNCOLOR_ORCHID,"Your Not The Correct Level To Use This Commend");
return 1;
}
Try this
Re: OOC Toggle Help -
zT KiNgKoNg - 03.09.2012
No its can't read the .amx now
Re: OOC Toggle Help -
ryansheilds - 03.09.2012
Uhm.. Try this:
pawn Код:
CMD:ooctoggle(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
if(oocstatus == 0){
oocstatus = 1;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Disabled By An Administrator");
}
else if(oocstatus == 1){
oocstatus = 0;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Enabled By An Administrator");
}
}
else
{
SendClientMessage(playerid,KNOWNCOLOR_ORCHID,"Your Not The Correct Level To Use This Commend");
}
return 1;
}
Re: OOC Toggle Help -
denNorske - 03.09.2012
Did it wrong sorry.
pawn Код:
CMD:ooctoggle(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
if(oocstatus == 0){
oocstatus = 1;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Disabled By An Administrator");
}
else if(oocstatus == 1){
oocstatus = 0;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Enabled By An Administrator");
}
}
else
{
SendClientMessage(playerid,KNOWNCOLOR_ORCHID,"Your Not The Correct Level To Use This Commend");
}
return 1;
}