C:\Users\Elvis JR\Desktop\CNR-rp\gamemodes\1.2.pwn(2489) : warning 213: tag mismatch
C:\Users\Elvis JR\Desktop\CNR-rp\gamemodes\1.2.pwn(2527) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Warnings.
if(playertextid == CDisagree[playerid])
if(playertextid == CAccept[playerid])
if(_:playertextid != INVALID_TEXT_DRAW) // If the player clicked a valid textdraw, continue with the coding. (_:var removes the Text: tag, to avoid tag mismatch)
{
if(playertextid == CAccept[playerid]) // this is the Line
{
if(gTeam[playerid] == Team_Cop) // if hes\her is a cop !
{
SendClientMessage(playerid, COLOR_RED, "You are already Police Officer!");
TextDrawHideForPlayer(playerid, PoliceO[playerid]);
TextDrawHideForPlayer(playerid, MainBoxC[playerid]);
TextDrawHideForPlayer(playerid, AsACop[playerid]);
TextDrawHideForPlayer(playerid, CanDoC[playerid]);
TextDrawHideForPlayer(playerid, PCStar[playerid]);
TextDrawHideForPlayer(playerid, CCMD[playerid]);
TextDrawHideForPlayer(playerid, CRules[playerid]);
TextDrawHideForPlayer(playerid, CAccept[playerid]);
TextDrawHideForPlayer(playerid, CDisagree[playerid]);
CancelSelectTextDraw(playerid);
return true;
} // down = if not
gTeam[playerid] = Team_Cop;
SetPlayerSkin(playerid, 280);
SetCameraBehindPlayer(playerid);
//SetPlayerColor(playerid, COLOR_LIGHTBLUE);
RadioInfo[playerid][pCopRadio] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You Accepted Police Officer Job!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Do /commands for police Office Commands!");
TextDrawHideForPlayer(playerid, PoliceO[playerid]);
TextDrawHideForPlayer(playerid, MainBoxC[playerid]);
TextDrawHideForPlayer(playerid, AsACop[playerid]);
TextDrawHideForPlayer(playerid, CanDoC[playerid]);
TextDrawHideForPlayer(playerid, PCStar[playerid]);
TextDrawHideForPlayer(playerid, CCMD[playerid]);
TextDrawHideForPlayer(playerid, CRules[playerid]);
TextDrawHideForPlayer(playerid, CAccept[playerid]);
TextDrawHideForPlayer(playerid, CDisagree[playerid]);
CancelSelectTextDraw(playerid);
}
}
if(_:playertextid != INVALID_TEXT_DRAW) // If the player clicked a valid textdraw, continue with the coding. (_:var removes the Text: tag, to avoid tag mismatch)
{
if(playertextid == CDisagree[playerid]) // and this one
{
SendClientMessage(playerid, COLOR_RED, "You Disagree Police Officer Job!");
TextDrawShowForPlayer(playerid, PoliceO[playerid]);
TextDrawHideForPlayer(playerid, MainBoxC[playerid]);
TextDrawHideForPlayer(playerid, AsACop[playerid]);
TextDrawHideForPlayer(playerid, CanDoC[playerid]);
TextDrawHideForPlayer(playerid, PCStar[playerid]);
TextDrawHideForPlayer(playerid, CCMD[playerid]);
TextDrawHideForPlayer(playerid, CRules[playerid]);
TextDrawHideForPlayer(playerid, CAccept[playerid]);
TextDrawHideForPlayer(playerid, CDisagree[playerid]);
CancelSelectTextDraw(playerid);
}
}
It seems that you are using per-player textdraws. So you should add [MAX_PLAYERS] to the textdraw variable.
|
new Text:CAccept[MAX_PLAYERS];
new Text:CDisagree[MAX_PLAYERS];
public OnPlayerClickTextDraw(playerid, Text:clickedid)
playertextid is for Playertext draws. Your using global. Should be: clickedid
pawn Код:
|