} if(strcmp(cmd, "/veiculolocalizar", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pCarKey] == 0) { SetPlayerCheckpoint(playerid, CarInfo[pCarKey][cPos_X],CarInfo[pCarKey][cPos_Y],CarInfo[pCarKey][cPos_Z], 9.0); GameTextForPlayer(playerid, "~r~Veiculo Vip Marcado!", 5000, 1); } else { GameTextForPlayer(playerid, "~w~Voce nao tem um Veiculo Vip", 5000, 1); } } return 1; } |
new carkey = PlayerInfo[playerid][pCarKey];
SetPlayerCheckpoint(playerid, CarInfo[carkey][cPos_X],CarInfo[carkey][cPos_Y],CarInfo[carkey][cPos_Z], 9.0);
if(!strcmp("/veiculolocalizar",cmdtext, true))
{
new id, Float:Pharrel[3], str[30];
if(unformat(params, "s[30]i", str[30], id)) return SendClientMessage(playerid, -1, "Use: /encontrarcarro [ID DO CARRO]");
GetVehiclePos(id, pharrel[0], pharrel[1], pharrel[2]);
SetVehicleCheckpoint(playerid, pharrel[0], pharrel[1], pharrel[2], 10.0);
return GameTextForPlayer(playerid, "~r~Veiculo Vip Marcado!", 5000, 1);
}
//com a variavel do veiculo q vc postou acima.
if(!strcmp("/veiculolocalizar",cmdtext, true))
{
new Float:Pharrel[3];
if(PlayerInfo[playerid][pCarKey] == 0) return SendClientMessage(playerid, -1, "vc n tem carro");
GetVehiclePos(PlayerInfo[playerid][pCarKey], pharrel[0], pharrel[1], pharrel[2]);
SetVehicleCheckpoint(playerid, pharrel[0], pharrel[1], pharrel[2], 10.0);
return GameTextForPlayer(playerid, "~r~Veiculo Vip Marcado!", 5000, 1);
}
//nesse n precisa do sscanf