11.11.2018, 01:33
Hi and thanks in advance for your help
In advance, I apologize for my bad english, is not my native language.
Look, I'm trying getting string variable from MYSQL. I get string perfectly from database but when use it as user variable it's as if there was void variable
Script of enum with player data and cache
LOG of MySQL plugin
I receive the SendClientMessage with empty string:
Thanks in advance again!.
In advance, I apologize for my bad english, is not my native language.
Look, I'm trying getting string variable from MYSQL. I get string perfectly from database but when use it as user variable it's as if there was void variable
Script of enum with player data and cache
PHP код:
enum ENUM_PLAYER_DATA
{
//more variables behind here
Clan[25],
Cache: Player_Cache,
bool:LoggedIn
}
new pInfo[MAX_PLAYERS][ENUM_PLAYER_DATA];
cache_get_value(0, "Clan", pInfo[playerid][Clan]);
Код HTML:
[23:11:58] [DEBUG] cache_get_value_name(0, "Clan", 0x03AD6C00, 1) [23:11:58] [DEBUG] cache_get_value_name: assigned value: 'TAW'
PHP код:
if(strcmp(pInfo[playerid][Clan],"TAW",true))
{
new nombre[24], string[29];
GetPlayerName(playerid, nombre, sizeof(nombre));
format(string, sizeof(string), "[%s]%s",pInfo[playerid][Clan], nombre);
SetPlayerName(playerid, string);
}
else
{
new string[29];
format(string, sizeof(string), "No eres TAW, eres: %s",pInfo[playerid][Clan]);
SendClientMessage(playerid, COLOR_RED, string);
}
Код HTML:
[23:11:58] No eres TAW, eres: