18.10.2011, 21:48
Galera й tipo quando eu compro um carro ate ai ta de boa mais os demias comandos nгo funciona como /veiculo modelo,estacionar,cor nгo funciona aparece uma msg Esse nгo й seu Carro VIP. somente o comprar funciona
aqui й o comando /veiculo
esse й o cmd de vender que no caso nao ta funcionando aparece a msg Esse nгo й seu Carro VIP.
aqui й o comando /veiculo
pawn Код:
if(strcmp(cmd,"/veiculo",true)==0 || strcmp(cmd,"/vh",true)==0)
{
new vehid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid,playername,sizeof(playername));
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE," USE: /veiculo ajuda para ver os comandos de seu veнculo VIP");
return 1;
}
if(strcmp(tmp, "ajuda", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pCarKey] != 0 || PlayerInfo[playerid][pCarKey2] != 0 || PlayerInfo[playerid][pCarKey3] != 0)
{
SendClientMessage(playerid, COLOR_GRAD2,"** (/v)eiculo comprar - para comprar o Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** (/v)eiculo vender - para vender o Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** (/v)eiculo ajuda - para ver os comandos dos Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** (/v)eiculo trancar - para trancar ou abrir o Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** (/v)eiculo cor - para mudar a cor do Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** (/v)eiculo estacionar - para estacionar o Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** (/v)eiculo modelo - para mudar o modelo do Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** /retirargrana - para retirar a grana do seu carro");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"** Vocк precisa estar no seu carro VIP para usar esses comandos.");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_GRAD2," Vocк nгo tem um Veiculo VIP! ");
return 1;
}
}
return 1;
}
pawn Код:
if(strcmp(tmp, "vender", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, playername, sizeof(playername));
if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid && PlayerInfo[playerid][pCarKey3] != vehid)
{
SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
return 1;
}
if(PlayerInfo[playerid][pCarKey] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pVeiculo]][cOwner], true) == 0)
{
new rand;
new car = PlayerInfo[playerid][pVeiculo];
CarInfo[car][cOwned] = 0;
CarInfo[car][cModel] = 560;
CarInfo[car][cColorOne] = 0;
CarInfo[car][cColorTwo] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[car][cOwner], "Dealership", 0, strlen("Dealership"), 999);
GivePlayerMoney(playerid,CarInfo[car][cValue]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Carro Vip Vendido Por: ~n~~g~$%d", CarInfo[car][cValue]);
GameTextForPlayer(playerid, string, 10000, 3);
RemovePlayerFromVehicleEx(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pCarKey] = 0;
PlayerInfo[playerid][pVeiculo] = 0;
rand = random(sizeof(gRandomCarsSpawns));
CarInfo[car][cLocationx] = gRandomCarsSpawns[rand][0];
CarInfo[car][cLocationy] = gRandomCarsSpawns[rand][1];
CarInfo[car][cLocationz] = gRandomCarsSpawns[rand][2];
CarInfo[car][cAngle] = gRandomCarsSpawns[rand][3];
SaveCars();
return 1;
}
else if(PlayerInfo[playerid][pCarKey2] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pVeiculo2]][cOwner], true) == 0)
{
new rand;
new car = PlayerInfo[playerid][pVeiculo2];
CarInfo[car][cOwned] = 0;
CarInfo[car][cModel] = 560;
CarInfo[car][cColorOne] = 0;
CarInfo[car][cColorTwo] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[car][cOwner], "Dealership", 0, strlen("Dealership"), 999);
GivePlayerMoney(playerid,CarInfo[car][cValue]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Carro Vip Vendido Por: ~n~~g~$%d", CarInfo[car][cValue]);
GameTextForPlayer(playerid, string, 10000, 3);
RemovePlayerFromVehicleEx(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pCarKey2] = 0;
PlayerInfo[playerid][pVeiculo2] = 0;
rand = random(sizeof(gRandomCarsSpawns));
CarInfo[car][cLocationx] = gRandomCarsSpawns[rand][0];
CarInfo[car][cLocationy] = gRandomCarsSpawns[rand][1];
CarInfo[car][cLocationz] = gRandomCarsSpawns[rand][2];
CarInfo[car][cAngle] = gRandomCarsSpawns[rand][3];
SaveCars();
return 1;
}
else if(PlayerInfo[playerid][pCarKey3] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pVeiculo3]][cOwner], true) == 0)
{
new rand;
new car = PlayerInfo[playerid][pVeiculo3];
CarInfo[car][cOwned] = 0;
CarInfo[car][cModel] = 560;
CarInfo[car][cColorOne] = 0;
CarInfo[car][cColorTwo] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[car][cOwner], "Dealership", 0, strlen("Dealership"), 999);
GivePlayerMoney(playerid,CarInfo[car][cValue]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Carro Vip Vendido Por: ~n~~g~$%d", CarInfo[car][cValue]);
GameTextForPlayer(playerid, string, 10000, 3);
RemovePlayerFromVehicleEx(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pCarKey3] = 0;
PlayerInfo[playerid][pVeiculo3] = 0;
rand = random(sizeof(gRandomCarsSpawns));
CarInfo[car][cLocationx] = gRandomCarsSpawns[rand][0];
CarInfo[car][cLocationy] = gRandomCarsSpawns[rand][1];
CarInfo[car][cLocationz] = gRandomCarsSpawns[rand][2];
CarInfo[car][cAngle] = gRandomCarsSpawns[rand][3];
SaveCars();
return 1;
}
}
return 1;
}