if(dialogid == DIALOG_MEAVALIE)
{
if(response == 1)
{
SendClientMessage(meavalie[playerid],COLOR_GRAD2,"O Jogador qualificou a sua ajuda como {9EC73D}POSITIVA");
PlayerInfo[meavalie[playerid]][pHelper] = PlayerInfo[meavalie[playerid]][pHelper]+1;
format(string, sizeof(string), "Vocк classificou a ajuda do Helper %s como {9EC73D}positiva!",giveplayer);
SendClientMessage(playerid,COLOR_HELPER,string);
}
if(response == 0)
{
SendClientMessage(meavalie[playerid],COLOR_GRAD2,"O Jogador qualificou a sua ajuda como {FF0000}NEGATIVA");
format(string, sizeof(string), "Vocк classificou a ajuda do Helper %s como {FF0000}negativa!",giveplayer);
SendClientMessage(playerid,COLOR_HELPER,string);
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
TogglePlayerControllable(playerid, 1);
new string[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
if(dialogid == DIALOG_MEAVALIE)
{
if(response == 1)
{
SendClientMessage(meavalie[playerid],COLOR_GRAD2,"O Jogador qualificou a sua ajuda como {9EC73D}POSITIVA");
PlayerInfo[meavalie[playerid]][pHelper] = PlayerInfo[meavalie[playerid]][pHelper]+1;
format(string, sizeof(string), "Vocк classificou a ajuda do Helper %s como {9EC73D}positiva!",giveplayer);
SendClientMessage(playerid,COLOR_HELPER,string);
}
if(response == 0)
{
SendClientMessage(meavalie[playerid],COLOR_GRAD2,"O Jogador qualificou a sua ajuda como {FF0000}NEGATIVA");
format(string, sizeof(string), "Vocк classificou a ajuda do Helper %s como {FF0000}negativa!",giveplayer);
SendClientMessage(playerid,COLOR_HELPER,string);
}
return 1;
}
PHP код:
|
(3973) : warning 217: loose indentation |
// Vo por o Code Completo pera '-'
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
// CODE COMPLETO
if(dialogid == 10101)
{
if(response)
{
new Float:X, Float:Y, Float:Z, Float:angle;
if(strlen(inputtext) < 1 || strlen(inputtext) > 8) return SendClientMessage(playerid, 0xAFAFAFAA, "Texto Invalido.");
else
{
format(string, sizeof(string), "Vocк mudou o texto de sua placa para '%s'.", inputtext);
SendClientMessage(playerid, 0x33CCFFAA, string);
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, angle);
SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext);
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
GetPlayerPos(playerid, X, Y, Z);
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
SetVehicleZAngle(GetPlayerVehicleID(playerid), angle);
PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z+2);
}
}
return 1;
}
if(dialogid == 1) |
if(dialogid == 1)
{
if(response == 0)
{
SendClientMessage(playerid, TEAM_VAGOS_COLOR, "Ok, Caso queira fazer login posteriormente use /logar [senha]!");
return 1;
}
if(response >= 1)
{
if(strlen(inputtext) == 0)
{
//SetPlayerCameraPos(playerid,1463.9277,-1043.5249,31.3181);
//SetPlayerCameraLookAt(playerid,1461.7306,-1014.2181,26.6566);
//SetPlayerPos(playerid,1424.6486,-1020.7975,23.8281);
new loginstring[256];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
SendClientMessage(playerid, 0x00F0F0AA, "Seu nick estб registrado, й sу Logar");
SendClientMessage(playerid, 0x00F0F0AA, "Caso erre a senha 5 vezes, terб o ip banido");
format(loginstring,sizeof(loginstring),"{33CCFF}\n\n{33FF00}{f7f7f7}%s{33FF00} Bem Vindo(a)\n\n{33FF00}Sua conta estб Registrada! \n\n{33FF00}Por favor logue na sua conta!!\n\n{33CCFF}",loginname);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT,"{FFFF00}Brasil Games Living || The Return",loginstring,"Logar","Sair");
return 1;
}
format(gstring,sizeof(gstring),"/logar %s",inputtext);
OnPlayerCommandText(playerid,gstring);
return 1;
}
return 1;
}
if(dialogid == 10101)
{
if(response)
{
new Float:X, Float:Y, Float:Z, Float:angle;
if(strlen(inputtext) < 1 || strlen(inputtext) > 8) return SendClientMessage(playerid, 0xAFAFAFAA, "Texto Invalido.");
format(string, sizeof(string), "Vocк mudou o texto de sua placa para '%s'.", inputtext);
SendClientMessage(playerid, 0x33CCFFAA, string);
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, angle);
SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext);
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
GetPlayerPos(playerid, X, Y, Z);
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
SetVehicleZAngle(GetPlayerVehicleID(playerid), angle);
PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z+2);
}
return 1;
}