Me ajudem a fazer isso -
View - 10.08.2013
Olб pessoal, queria colocar um valor para troca de veicuos da casa, como posso fazer?
pawn Код:
if(casa == -1){return false;}
format(string, sizeof(string), "/Casas/casa%d.ini", casa);
if(listitem == 0){dini_IntSet(string,"ModeloV",405);}
else if(listitem == 1){dini_IntSet(string,"ModeloV",412);}
else if(listitem == 2){dini_IntSet(string,"ModeloV",426);}
Re: Me ajudem a fazer isso -
P1c4550 - 11.08.2013
posta o comando que troca o veiculo casa
Re: Me ajudem a fazer isso -
View - 11.08.2013
pawn Код:
if(strcmp(cmd, "/veiculocasa", true) == 0) {
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
new cstring[100];
for(new c = 0; c < MAX_CASAS; c++)
{
format(cstring, sizeof(cstring), "/Casas/casa%d.ini", c);
if(dini_Exists(cstring)){
if(IsPlayerInRangeOfPoint(playerid, 2.0, dini_Float(cstring, "PosX"), dini_Float(cstring, "PosY"), dini_Float(cstring, "PosZ"))){
if(dini_Int(cstring, "TDono") == 1 || pAdmin[playerid] >= 5){
if(!strcmp(dini_Get(cstring, "Dono"), pname) || pAdmin[playerid] >= 5){
ShowPlayerDialog(playerid,DIALOG_CASAS_VEICULO,DIALOG_STYLE_LIST,"Veнculo Casa",
"Sentinel\nVoodoo\nPremier\nInfernus\nNRG-500\nSultan\nTurismo\nSanchez\nSandking\nBullet\nElegy\nBuffalo\nInfernus\nPerenniel\nSentinel\nCheetah\nEsperanto\nBobcat\nBF Injection\nBanshee\nStallion\nRomero\nPCJ-600\nFreeway\nGlendale\nOceanic\nSabre\nZR-350\nRegina\nComet\nBMX\nCamper\n\nVirgo\nGreenwood\nHotring Racer 1\nHotring Racer 2\nHotring Racer 3\nJeep\nSuper GT\nElegant\nMountain Bike\nMajestic\nFCR-900\nFeltzer\nRemington\nSlamvan\nBlade\nYosemite\nSavanna\nHuntley\n",
"Trocar","Sair");
return true;
}else{if(c == MAX_CASAS-1){SendClientMessage(playerid, Vermelho, "Esta casa nгo й sua!");}}
}else{if(c == MAX_CASAS-1){SendClientMessage(playerid, Vermelho, "Esta casa nгo й sua!");}}
}else{if(c == MAX_CASAS-1){SendClientMessage(playerid, Vermelho, "Vocк nгo estб em nenhuma casa!");}}
}
}
return true;
}
Re: Me ajudem a fazer isso -
Magnus' - 11.08.2013
Vocк terб que cobrar na dialog
DIALOG_CASAS_VEICULO, faзa algo como:
pawn Код:
new gp = GetPlayerMoney(playerid);
if(gp < 10000) return SendClientMessage(playerid, -1, "Vocк nгo tem 10000.");
GivePlayerMoney(playerid, -10000);
SendClientMessage(playerid, -1, "Vocк mudou seu carro por 10000.");
Re: Me ajudem a fazer isso -
View - 12.08.2013
Consegui fazer porйm nessa parte da erro ...linha muito grande, qual macete p sanar esse erro?
pawn Код:
ShowPlayerDialog(playerid,DIALOG_CASAS_VEICULO,DIALOG_STYLE_LIST,"Veнculo Casa",
"Sentinel\nVoodoo\nPremier\nInfernus\nNRG-500\nSultan\nTurismo\nSanchez\nSandking\nBullet\nElegy\nBuffalo\nInfernus\nPerenniel\nSentinel\nCheetah\nEsperanto\nBobcat\nBF Injection\nBanshee\nStallion\nRomero\nPCJ-600\nFreeway\nGlendale\nOceanic\nSabre\nZR-350\nRegina\nComet\nBMX\nCamper\n\nVirgo\nGreenwood\nHotring Racer 1\nHotring Racer 2\nHotring Racer 3\nJeep\nSuper GT\nElegant\nMountain Bike\nMajestic\nFCR-900\nFeltzer\nRemington\nSlamvan\nBlade\nYosemite\nSavanna\nHuntley\n",
"Trocar","Sair");
Re: Me ajudem a fazer isso -
focaximubh - 12.08.2013
utilize strcat
Re: Me ajudem a fazer isso -
View - 12.08.2013
Pesquisei jб aqui forum, porйm n consegui entender como fazer visto q se trata de um dialog list
Re: Me ajudem a fazer isso -
focaximubh - 12.08.2013
pawn Код:
if(strcmp(cmd, "/veiculocasa", true) == 0) {
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
new cstring[100];
for(new c = 0; c < MAX_CASAS; c++)
{
format(cstring, sizeof(cstring), "/Casas/casa%d.ini", c);
if(dini_Exists(cstring)){
if(IsPlayerInRangeOfPoint(playerid, 2.0, dini_Float(cstring, "PosX"), dini_Float(cstring, "PosY"), dini_Float(cstring, "PosZ"))){
if(dini_Int(cstring, "TDono") == 1 || pAdmin[playerid] >= 5){
if(!strcmp(dini_Get(cstring, "Dono"), pname) || pAdmin[playerid] >= 5){
new stringuis1[94];
strcat(stringuis1, "Sentinel\nVoodoo\nPremier\nInfernus\nNRG-500\nSultan\nTurismo\nSanchez\nSandking\nBullet\nElegy\nBuffalo\nInfernus\nPerenniel\nSentinel\nCheetah\nEsperanto\nBobcat\nBF Injection\nBanshee\nStallion\nRomero\nPCJ-600\nFreeway\nGlendale\nOceanic\nSabre\nZR-350\nRegina\nComet\nBMX\nCamper\n\nVirgo\nGreenwood\nHotring Racer 1\nHotring Racer 2\nHotring Racer 3\nJeep\nSuper GT\nElegant\nMountain Bike\nMajestic\nFCR-900\nFeltzer\nRemington\nSlamvan\nBlade\nYosemite\nSavanna\nHuntley\n");
ShowPlayerDialog(playerid, DIALOG_CASAS_VEICULO, DIALOG_STYLE_LIST, "Veнculo Casa", stringuis1, "Selecionar", "Sair");
return true;
}else{if(c == MAX_CASAS-1){SendClientMessage(playerid, Vermelho, "Esta casa nгo й sua!");}}
}else{if(c == MAX_CASAS-1){SendClientMessage(playerid, Vermelho, "Esta casa nгo й sua!");}}
}else{if(c == MAX_CASAS-1){SendClientMessage(playerid, Vermelho, "Vocк nгo estб em nenhuma casa!");}}
}
}
return true;
}
Re: Me ajudem a fazer isso -
View - 12.08.2013
C:\Documents and Settings\Administrador\Desktop\pk.pwn(6837) : warning 204: symbol is assigned a value that is never used: "prc"
C:\Documents and Settings\Administrador\Desktop\pk.pwn(7807) : error 075: input line too long (after substitutions)
C:\Documents and Settings\Administrador\Desktop\pk.pwn(780
: error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\Administrador\Desktop\pk.pwn(780
: error 017: undefined symbol "Sentinel"
C:\Documents and Settings\Administrador\Desktop\pk.pwn(780
: error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador\Desktop\k.pwn(780
: fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
ta osso.
Re: Me ajudem a fazer isso -
focaximubh - 12.08.2013
pawn Код:
if(strcmp(cmd, "/veiculocasa", true) == 0) {
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
new cstring[100];
for(new c = 0; c < MAX_CASAS; c++)
{
format(cstring, sizeof(cstring), "/Casas/casa%d.ini", c);
if(dini_Exists(cstring)){
if(IsPlayerInRangeOfPoint(playerid, 2.0, dini_Float(cstring, "PosX"), dini_Float(cstring, "PosY"), dini_Float(cstring, "PosZ"))){
if(dini_Int(cstring, "TDono") == 1 || pAdmin[playerid] >= 5){
if(!strcmp(dini_Get(cstring, "Dono"), pname) || pAdmin[playerid] >= 5){
new stringuis1[94];
strcat(stringuis1, "Sentinel\nVoodoo\nPremier\nInfernus\nNRG-500\nSultan\nTurismo\nSanchez\nSandking\nBullet\nElegy\nBuffalo\nInfernus\nPerenniel\nSentinel\nCheetah\nEsperanto\nBobcat\nBF Injection\nBanshee\nStallion\nRomero\nPCJ-600\nFreeway\nGlendale\nFCR-900\nFeltzer\nRemington\nSlamvan\nBlade\nYosemite\nSavanna\nHuntley\n");
strcat(stringis1, "Oceanic\nSabre\nZR-350\nRegina\nComet\nBMX\nCamper\n\nVirgo\nGreenwood\nHotring Racer 1\nHotring Racer 2\nHotring Racer 3\nJeep\nSuper GT\nElegant\nMountain Bike\nMajestic\n");
ShowPlayerDialog(playerid, DIALOG_CASAS_VEICULO, DIALOG_STYLE_LIST, "Veнculo Casa", stringuis1, "Selecionar", "Sair");
return true;
}else{if(c == MAX_CASAS-1){SendClientMessage(playerid, Vermelho, "Esta casa nгo й sua!");}}
}else{if(c == MAX_CASAS-1){SendClientMessage(playerid, Vermelho, "Esta casa nгo й sua!");}}
}else{if(c == MAX_CASAS-1){SendClientMessage(playerid, Vermelho, "Vocк nгo estб em nenhuma casa!");}}
}
}
return true;
}