a bit help SetPlayerLanguage
#1

must be assigned to an array
pawn Код:
stock SetPlayerLanguage(playerid, language[]) PlayerData[playerid][Language] = language;
This gonna fail too i guess:
pawn Код:
if(!strcmp("EN", PlayerData[playerid][Language], false))
Reply
#2

SOLUTION HERE
Reply
#3

i have already searched, and i didnt find a solution...
Reply
#4

why do you need that anyway??

just add in the beggining

Код:
new language[MAX_PLAYERS]
and use

Код:
if(language[playerid]) == 1)
also to set the language do something like this under on player command

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/english", true, 3)) // 3 is the length of /me
    {
        language[playerid] = 1;
        return 1;
    }
    return 0;
}
Reply
#5

Let me know if it works.
Reply
#6

No it wont.

The language is saved on MySQL for each player.. so he dont have to type /english everytime he join

Just you know it the usage of the funcion should work like this:
pawn Код:
SetPlayerLanguage(playerid, "EN"); //EN = English
i belive i have to do something like
pawn Код:
stock SetPlayerLanguage(playerid, language[]) PlayerData[playerid][Language] = strval(language);
idk..
and i think this will fail
pawn Код:
if(!strcmp("EN", PlayerData[playerid][Language], false))
Reply
#7

sorry dude... i don't use MYSQL....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)