How do i fix this - 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: How do i fix this (
/showthread.php?tid=173602)
How do i fix this -
mrcoolballs - 03.09.2010
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[])
{
if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid, BRIGHTRED,"You are jailed, don't try any commands!");
new owner;
owner = PlayerInfo[playerid][Owner] = 1;
if(playerid != owner)
{
new str[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(str,sizeof(str),"%s(%d):%s",name,playerid,cmdtext);
SendClientMessage(owner,GREY,str);
}
else
{
return 1;
}
return 0;
}
im using zcmd so i have to put it under that callback but it isnt working, anyone know why?
Re: How do i fix this -
mrcoolballs - 03.09.2010
bumppppppppppppppppppppppppp
Re: How do i fix this -
Venturas - 03.09.2010
bumpppppppppppppppppppppppppppppppppenis
Re: How do i fix this -
gamer931215 - 03.09.2010
Getting any errors or warnings ?
and are you sure about this part:
pawn Код:
owner = PlayerInfo[playerid][Owner] = 1;
check that again, i think you shouldnt put =1 behind it.
And i dont know what this script should do, but if i see it correctly, when an player is an admin it returns 1, so doesnt do anything anymore then. So also check your returns.
Re: How do i fix this -
Backwardsman97 - 03.09.2010
I think you should stop bumping this every few minutes and maybe try posting in the zcmd filterscript post?
Re: How do i fix this -
mrcoolballs - 03.09.2010
I bumped it after 20 minutes one time, and the code is to show all the commands that get executed to the owner besides the commands that the owner uses
Re: How do i fix this -
Calgon - 03.09.2010
Use the 'OnPlayerCommandReceived' callback instead of 'OnPlayerCommandExecuted'.
Re: How do i fix this -
mrcoolballs - 03.09.2010
now no commands work at all, here is what I have,
pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid, BRIGHTRED,"You are jailed, don't try any commands!");
new owner;
owner = PlayerInfo[playerid][Owner] = 1;
if(playerid != owner)
{
new str[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(str,sizeof(str),"%s(%d):%s",name,playerid,cmdtext);
SendClientMessage(owner,GREY,str);
}
else
{
return 1;
}
return 0;
}