veiculo -
Mackanor - 21.02.2018
glr to precisando de uma ajuda no meu sv quando eu pego um carro e outro admin (que esta longe) cria tbm o carro dos outros somem e so o dele fica vou ta postando o code aqui pra vcs verem mt obrigado quem ajudar
PHP код:
if(strcmp(cmd, "/cv", true) == 0)
{
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5) {
new plid;
new Float:X,Float:Y,Float:Z,Float:Angle;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "| ERRO | Digite: /cv [id-do-caro]");
return 1;
}
plid = strval(tmp);
if(plid==594) {
SendClientMessage(playerid, Vermelho, "| ERRO | ID de carro Proibido!");
return 1;
}
if(IsPlayerConnected(playerid)) {
if(plid >= 400 && plid <= 611) {
if(carroadmin[playerid] != -1) DestroyVehicle(carroadmin[playerid]);
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
carroadmin[playerid] = CreateVehicle(plid, X, Y, Z, Angle, -1, -1, 120000);
SetVehicleNumberPlate(carroadmin[playerid], "RLNE-Admin");
PutPlayerInVehicle(playerid,carroadmin[playerid],0);
if(GetPlayerInterior(playerid))
LinkVehicleToInterior(carroadmin[playerid],GetPlayerInterior(playerid));
format(string, sizeof(string), "| RLNE-Admin | Vocк criou o veнculo {FFFFFF}'{0CB80C}%s{FFFFFF}' {13A9F6}ID {FFFFFF}'{0CB80C}%d{FFFFFF}' !", PlayerVehicle[GetVehicleModel(GetPlayerVehicleID(playerid))-400],plid);
SendClientMessage(playerid, ocd, string);
SendClientMessage(playerid, ocd, "| INFO | Ao sair do veнculo ele serб automaticamente deletado!");
cVehicle[playerid] = true;
return 1;
}
else {
SendClientMessage(playerid, Vermelho, "| ERRO | ID invбlido | ID's = 400-611");
return 1;
}
}
}
}
Re: veiculo -
AdrianoStk - 22.02.2018
Tenta...
PHP код:
if(strcmp(cmd, "/cv", true) == 0)
{
if(pAdmin[playerid])
{
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, Vermelho, "| ERRO | Digite: /cv [id-do-caro]");
}
else
{
plid = strval(tmp);
if(plid==594)
{
SendClientMessage(playerid, Vermelho, "| ERRO | ID de carro Proibido!");
}
else
{
if(plid >= 400 && plid <= 611)
{
if(carroadmin[playerid] != -1)
{
DestroyVehicle(carroadmin[playerid]);
}
new Float:X,Float:Y,Float:Z,Float:Angle;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
carroadmin[playerid] = CreateVehicle(plid, X, Y, Z, Angle, -1, -1, 120000);
SetVehicleNumberPlate(carroadmin[playerid], "RLNE-Admin");
PutPlayerInVehicle(playerid,carroadmin[playerid],0);
if(GetPlayerInterior(playerid))
{
LinkVehicleToInterior(carroadmin[playerid],GetPlayerInterior(playerid));
}
format(string, sizeof(string), "| RLNE-Admin | Vocк criou o veнculo {FFFFFF}'{0CB80C}%s{FFFFFF}' {13A9F6}ID {FFFFFF}'{0CB80C}%d{FFFFFF}' !", PlayerVehicle[GetVehicleModel(GetPlayerVehicleID(playerid))-400],plid);
SendClientMessage(playerid, ocd, string);
SendClientMessage(playerid, ocd, "| INFO | Ao sair do veнculo ele serб automaticamente deletado!");
cVehicle[playerid] = true;
}
else
{
SendClientMessage(playerid, Vermelho, "| ERRO | ID invбlido | ID's = 400-611");
}
}
}
}
return 1;
}
Re: veiculo -
Santso - 23.02.2018
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new modelo, carro,
Float:X, Float:Y, Float:Z, Float:Angle;
if(sscanf(params, "d", modelo)) return SendClientMessage(playerid, vermelho, "[ERRO] Comando Incorreto, Use: /cv [modelo]");
if(IsPlayerConnected(playerid))
{
if(modelo >= 400 && modelo <= 611)
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, vermelho, "[ERRO] Saia deste veнculo para criar outro.");
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
carro = AddStaticVehicleEx(modelo, X, Y, Z, Angle, -1, -1, 30);
PutPlayerInVehicle(playerid, carro, 0);
}
else return SCM(playerid, vermelho, "[ERRO] Id invбlido, use use: ID's = 400-611");
}
}