Warn - 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: Warn (
/showthread.php?tid=80892)
Warn -
-eXo - 07.06.2009
I'm trying to make it so when a player logs in, if they have a warning on them it sends a message to all admins online saying something like "[WARN] Player XX has a live warning issued by another admin. I haven't been able to figure out how to send it to all admins using aBroadcast or any other way. Here is the check I use to see if the player is warned.
Quote:
if(PlayerInfo[playerid][pWarn] = 1)
{
|
Re: Warn -
samgreen - 07.06.2009
Haha, small typos mean A LOT!
You are assigning the value of one to the PlayerInfo array. I think you are intending to check the value of the player array. The operator you used is "=", the operator you want is "==".
Quote:
if(PlayerInfo[playerid][pWarn] == 1)
{
|
Re: Warn -
DjSterios - 07.06.2009
Код:
if(PlayerInfo[playerid][pWarns] >= 1)
{
format(string, sizeof(string), "[Warning] Player %s has %d Warnings!", targetid, PlayerInfo[playerid][pWarns]);
SendAdminMessage(0xFF0000FF, string);
}
Something like this. If you need more help, PM me.
Re: Warn -
DjSterios - 07.06.2009
oh yeah right, i forgot it
Re: Warn -
-eXo - 08.06.2009
Quote:
Originally Posted by DjSterios
Код:
if(PlayerInfo[playerid][pWarns] >= 1)
{
format(string, sizeof(string), "[Warning] Player %s has %d Warnings!", targetid, PlayerInfo[playerid][pWarns]);
SendAdminMessage(0xFF0000FF, string);
}
Something like this. If you need more help, PM me.
|
With that I get
C:\Users\staples036\Downloads\RLRP V2\gamemodes\rlrp.pwn(12161) : error 017: undefined symbol "string"
C:\Users\staples036\Downloads\RLRP V2\gamemodes\rlrp.pwn(12161) : error 017: undefined symbol "string"
C:\Users\staples036\Downloads\RLRP V2\gamemodes\rlrp.pwn(12161) : error 029: invalid expression, assumed zero
C:\Users\staples036\Downloads\RLRP V2\gamemodes\rlrp.pwn(12161) : fatal error 107: too many error messages on one line
Re: Warn -
lol2112 - 08.06.2009
Because you haven't defined an array to hold the string...
Add this line inside the if clause: