ScreaM féle alap szkript.
Nincs tesztelve.
Ha máshol akarod használni akkor:
[pawn]if(GetPVarInt(playerid, \"Language\") == NYELVAZONOSÍTÓ) ....[/pawn]
Nyelv azonosítószámok:
Magyar (0)
Angol (1)
[pawn]
#include a_samp
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid, 1234, 2, \"{00FF00}Nyelv/{FFFF00}Language\", \"{FFFF00}Magyar {00FF00}(Hungarian)\\n{FFFF00}English (Angol)\", \"Választ\", \"Select\");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1234)
{
if(listitem == 0)
{
SetPVarInt(playerid, \"Language\", 0);
SendClientMessage(playerid, -1, \"{8080FF}Üdv a szerveren!\");
SendClientMessage(playerid, -1, \"{FFE000}Nyelved: {00FF00}Magyar\");
}
else if(listitem == 1)
{
SetPVarInt(playerid, \"Language\", 1);
SendClientMessage(playerid, -1, \"{8080FF}Welcome to this server!\");
SendClientMessage(playerid, -1, \"{FFE000}Your language: {00FF00}English\");
}
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid, \"Language\") == 0) return SendClientMessage(playerid, -1, \"{FFFF00}Lespawnoltál.\");
else SendClientMessage(playerid, -1, \"{FFFF00}You spawned.\");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(\"/help\", cmdtext, true))
{
if(GetPVarInt(playerid, \"Language\") == 0) return SendClientMessage(playerid, -1, \"{FFFF00}Üdv. {00FF00}Segítség kell? {FF0000}Szólj az adminoknak!\");
else SendClientMessage(playerid, -1, \"{FFFF00}Hello. {00FF00}Need help? {FF0000}Ask the admins!\");
}
return 0;
}
[/pawn]