07.11.2016, 15:34
Olб quando eu dou /cv fica normal ai quando outro admin da /cv o meu veiculo some tem como me ajudar agradeзo
Codigo do /cv
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-carro]");
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], "CVO-Admin");
PutPlayerInVehicle(playerid,carroadmin[playerid],0);
if(GetPlayerInterior(playerid))
LinkVehicleToInterior(carroadmin[playerid],GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carroadmin[playerid],GetPlayerVirtualWorld(playerid));
format(string, sizeof(string), "| CVO-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;
}
}
}
return 1;
}
Codigo do /cv
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-carro]");
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], "CVO-Admin");
PutPlayerInVehicle(playerid,carroadmin[playerid],0);
if(GetPlayerInterior(playerid))
LinkVehicleToInterior(carroadmin[playerid],GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carroadmin[playerid],GetPlayerVirtualWorld(playerid));
format(string, sizeof(string), "| CVO-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;
}
}
}
return 1;
}