Need help with language system
#1

so i made myself language system . The problem is my zcmd command doesn't work ;/

So i will show u how did i make it

Quote:

new Kalba[MAX_PLAYERS];

OnPlayerSpawn

Quote:

ShowPlayerDialog(playerid,10,DIALOG_STYLE_LIST,"La nguage","Lietuvių\nEnglish","Select","");

Under OnDialogResponse

Quote:

if(dialogid == 10)
{
if(response)
{
if(listitem == 0)
{
Kalba[playerid] = 1;
}
if(listitem == 1)
{
Kalba[playerid] = 2;
}
}
return 1;
}

And there's my problem.

When i type /mylang it doesn't show anything.
Quote:

COMMAND:mylang(playerid, params[])
{
if(Kalba[playerid]==1) SendClientMessage(playerid, 0xFF9900AA, "Tavo kalba: Lietuvių");
if(Kalba[playerid]==2) SendClientMessage(playerid, 0xFF9900AA, "Your language: English");
return 1;
}

all other zcmd commands work , but this not .
Reply
#2

any help ?
Reply
#3

try this

pawn Код:
COMMAND:mylang(playerid, params[])
{
if(Kalba[playerid]==1) return SendClientMessage(playerid, 0xFF9900AA, "Tavo kalba: Lietuvių");
if(Kalba[playerid]==2) return SendClientMessage(playerid, 0xFF9900AA, "Your language: English");
return 1;
}
Reply
#4

Quote:
Originally Posted by Broker
Посмотреть сообщение
try this

pawn Код:
COMMAND:mylang(playerid, params[])
{
if(Kalba[playerid]==1) return SendClientMessage(playerid, 0xFF9900AA, "Tavo kalba: Lietuvių");
if(Kalba[playerid]==2) return SendClientMessage(playerid, 0xFF9900AA, "Your language: English");
return 1;
}
Hmm .. When i write nothing happens.

I tested out with sctrmp . Says Unknown Command . But command does exist .
Reply
#5

Bump , UP
Reply
#6

try this
pawn Код:
COMMAND:mylang(playerid, params[])
{
if(Kalba[playerid] == 1) SendClientMessage(playerid, 0xFF9900AA, "Tavo kalba: Lietuvių");
else if(Kalba[playerid] == 2) SendClientMessage(playerid, 0xFF9900AA, "Your language: English");
return 1;
}
Reply
#7

Quote:
Originally Posted by MrTinder
Посмотреть сообщение
try this
pawn Код:
COMMAND:mylang(playerid, params[])
{
if(Kalba[playerid] == 1) SendClientMessage(playerid, 0xFF9900AA, "Tavo kalba: Lietuvių");
else if(Kalba[playerid] == 2) SendClientMessage(playerid, 0xFF9900AA, "Your language: English");
return 1;
}
Thanks , somehow it worked !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)