public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; if(strcmp(cmd, "/test", true) == 0) { if(gTeam[playerid] == TEAM_ARMY) { SendPlayerFormattedText(playerid,"You are in army.",0); }else{ SendPlayerFormattedText(playerid,"You are not in the army",0); } } return 1; } return 0; }
C:\Documents and Settings\Daniel\Desktop\GTA\Server\gamemodes\sftdm.pwn(460) : warning 235: public function lacks forward declaration (symbol "SetupPlayerForClassSelection") C:\Documents and Settings\Daniel\Desktop\GTA\Server\gamemodes\sftdm.pwn(562) : error 010: invalid function or declaration C:\Documents and Settings\Daniel\Desktop\GTA\Server\gamemodes\sftdm.pwn(599) : warning 203: symbol is never used: "strtok" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
460 :---->> public SetupPlayerForClassSelection(playerid) { SetPlayerInterior(playerid,14); SetPlayerPos(playerid,258.4893,-41.4008,1002.0234); SetPlayerFacingAngle(playerid, 90.0); SetPlayerCameraPos(playerid,256.0815,-43.0475,1003.0234); SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234); }
public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; if(strcmp(cmd, "/test", true) == 0) { if(gTeam[playerid] == TEAM_ARMY) { SendPlayerFormattedText(playerid,"You are in army.",0); }else{ SendPlayerFormattedText(playerid,"You are not in the army",0); } } 562 :----->>>return 1; } return 0; }
forward SetupPlayerForClassSelection(playerid);
public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; if(strcmp(cmd, "/test", true) == 0) { if(gTeam[playerid] == TEAM_ARMY) { SendPlayerFormattedText(playerid,"You are in army.",0); }else{ SendPlayerFormattedText(playerid,"You are not in the army",0); } } return 1; } 563 : ---->>>>>>return 0; }
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
if(strcmp(cmd, "/test", true) == 0)
{
if(gTeam[playerid] == TEAM_ARMY)
{
SendPlayerFormattedText(playerid,"You are in army.",0);
}
else
{
SendPlayerFormattedText(playerid,"You are not in the army",0);
}
return 1;
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; if(strcmp(cmd, "/test", true) == 0) { if(gTeam[playerid] == TEAM_ARMY) { SendPlayerFormattedText(playerid,"You are in army.",0); } else { SendPlayerFormattedText(playerid,"You are not in the army",0); } return 1; } return 0; }
Originally Posted by [AC
Etch ]
that is the right code Код:
public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; if(strcmp(cmd, "/test", true) == 0) { if(gTeam[playerid] == TEAM_ARMY) { SendPlayerFormattedText(playerid,"You are in army.",0); } else { SendPlayerFormattedText(playerid,"You are not in the army",0); } return 1; } return 0; } |
public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; if(strcmp(cmd, "/test", true) == 0) { if(gTeam[playerid] == TEAM_ARMY) { SendPlayerFormattedText(playerid,"You are in army.",0); } else { SendPlayerFormattedText(playerid,"You are not in the army",0); } return 1; } if(strcmp(cmd, "/test2", true) == 0) { if(gTeam[playerid] == TEAM_TALIBAN) { SendPlayerFormattedText(playerid,"You are a Taliban.",0); } else { SendPlayerFormattedText(playerid,"You are not a Taliban",0); } return 1; } return 0; }
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext,"/test", true) == 0) { if(gTeam[playerid] == TEAM_ARMY) { SendPlayerFormattedText(playerid,"You are in army.",0); } else return SendPlayerFormattedText(playerid,"You are not in the army",0); } if(strcmp(cmdtext,"/test2", true) == 0) { { if(gTeam[playerid] == TEAM_TALIBAN) { SendPlayerFormattedText(playerid,"You are a Taliban.",0); } else return SendPlayerFormattedText(playerid,"You are not a Taliban",0); } return 0; }
Originally Posted by [AC
Etch ]
try that : Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext,"/test", true) == 0) { if(gTeam[playerid] == TEAM_ARMY) { SendPlayerFormattedText(playerid,"You are in army.",0); } else return SendPlayerFormattedText(playerid,"You are not in the army",0); } if(strcmp(cmdtext,"/test2", true) == 0) { { if(gTeam[playerid] == TEAM_TALIBAN) { SendPlayerFormattedText(playerid,"You are a Taliban.",0); } else return SendPlayerFormattedText(playerid,"You are not a Taliban",0); } return 0; } |
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext,"/test", true) == 0) { if(gTeam[playerid] == TEAM_ARMY) { SendPlayerFormattedText(playerid,"You are in army.",0); } else return SendPlayerFormattedText(playerid,"You are not in the army",0); } if(strcmp(cmdtext,"/test2", true) == 0) { if(gTeam[playerid] == TEAM_TALIBAN) { SendPlayerFormattedText(playerid,"You are a Taliban.",0); } else return SendPlayerFormattedText(playerid,"You are not a Taliban",0); } return 0; }