Informaзхes diferentes para 3 personagens?
vocк terб que salvar cada dado dos personagens, por exemplo, salvar o dinheiro dos 3 personagens:
PHP код:
new
Money1[MAX_PLAYERS],
Money2[MAX_PLAYERS],
Money3[MAX_PLAYERS]
;
Nada muito complicado de se fazer, basta apenas pensar um pouquinho. Boa sorte.
PHP код:
new
Character1[MAX_PLAYERS],
Character2[MAX_PLAYERS],
Character3[MAX_PLAYERS]
;
public OnPlayerSpawn(playerid)
{
new str[60];
format(str, sizeof(str), "- Personagem (%d)\n- Personagem (%d)\n- Personagem (%d)", Character1[playerid], Character2[playerid], Character3[playerid]);
ShowPlayerDialog(playerid, 300, DIALOG_STYLE_LIST, "- Personagem", str, "Escolher", "Fechar");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 300){
if(response){
switch(listitem){
case 0: SetPlayerSkin(playerid, Character1[playerid]);
case 1: SetPlayerSkin(playerid, Character2[playerid]);
case 2: SetPlayerSkin(playerid, Character3[playerid]);
//case 3: SetPlayerSkin(playerid, Character4[playerid]);
//case 4: SetPlayerSkin(playerid, Character5[playerid]);
//case 5: SetPlayerSkin(playerid, Character6[playerid]);
//...
}
}
}
return 1;
}
SavePlayerAccount(playerid)//exemplo
{
DOF2_SetInt(..., "Personagem1", Character1[playerid]);
DOF2_SetInt(..., "Personagem2", Character2[playerid]);
DOF2_SetInt(..., "Personagem3", Character3[playerid]);
DOF2_SetInt(..., "Money1", Money1);
DOF2_SetInt(..., "Money2", Money2);
DOF2_SetInt(..., "Money3", Money3);
DOF2_SetInt(..., "Fome1", Fome1);
DOF2_SetInt(..., "Fome2", Fome2);
DOF2_SetInt(..., "Fome3", Fome3);
return 1;
}
Abraзos.