10.05.2015, 07:10
pawn Код:
if(strcmp(DOF2_GetString(pFile(playerid),"Clan"), "None")) return SetPlayerColor(playerid,C_WHITE);
if(strcmp(DOF2_GetString(pFile(playerid),"Clan"), "Accuracy")) return SetPlayerColor(playerid,C_A);
if(strcmp(DOF2_GetString(pFile(playerid),"Clan"), "None")) return SetPlayerColor(playerid,C_WHITE);
if(strcmp(DOF2_GetString(pFile(playerid),"Clan"), "Accuracy")) return SetPlayerColor(playerid,C_A);
if(!strcmp(DOF2_GetString(pFile(playerid),"Clan"), "None")) return SetPlayerColor(playerid,C_WHITE);
if(!strcmp(DOF2_GetString(pFile(playerid),"Clan"), "Accuracy")) return SetPlayerColor(playerid,C_A);
if(!strcmp(DOF2_GetString(pFile(playerid),"Clan"), "None")) return SetPlayerColor(playerid,C_WHITE); if(!strcmp(DOF2_GetString(pFile(playerid),"Clan"), "Accuracy")) return SetPlayerColor(playerid,C_A);
if(strcmp(DOF2_GetString(pFile(playerid),"Clan"), "None") == 0) return SetPlayerColor(playerid,C_WHITE);// with == 0
if(!strcmp(DOF2_GetString(pFile(playerid),"Clan"), "Accuracy")) return SetPlayerColor(playerid,C_A);// with the operator "!"
If strcmp return 0, the both strings are equal.
Both strings aren't equal, if strcmp return 1. |
Hello!
Does it work like this? PHP код:
|
The operator "!" means the same as == 0.
Look here: PHP код:
EDIT: If strcmp return 0, the both strings are equal. Both strings aren't equal, if strcmp return 1. |
if(!strcmp(DOF2_GetString(pFile(playerid),"Clan"),"Accuracy")) return SetPlayerColor(playerid,DOF2_GetString,"Clans/Accuracy.ini","Color");
if(!strcmp(DOF2_GetString(pFile(playerid),"Clan"),"Accuracy"))return SetPlayerColor(playerid,DOF2_GetString("Clans/Accuracy.ini","Color"));
if(!strcmp(DOF2_GetString(pFile(playerid),"Clan"),"Accuracy"))return SetPlayerColor(playerid,DOF2_GetInt("Clans/Accuracy.ini","Color"));