[Ajuda] Ajuda com o comando /CV
#1

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;
}
Reply
#2

PHP код:
if(strcmp(cmd"/cv"true) == 0)
{
if(
pAdmin[playerid]>= 1)
{
new 
plid;
new 
Float:X,Float:Y,Float:Z,Float:Angle;
tmp strtok(cmdtextidx);
if(!
strlen(tmp))
{
SendClientMessage(playeridVermelho"| ERRO | Digite: /cv [id-do-carro]");
return 
1;
}
plid strval(tmp);
if(
plid==594)
{
SendClientMessage(playeridVermelho"| ERRO | ID de carro Proibido!");
return 
1;
}
if(
IsPlayerConnected(playerid))
{
if(
plid >= 400 && plid <= 611)
{
if(
carroadmin[playerid] != -1DestroyVehicle(carroadmin[playerid]);
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
carroadmin[playerid] = CreateVehicle(plidXYZAngle, -1, -1120000);
SetVehicleNumberPlate(carroadmin[playerid], "CVO-Admin");
PutPlayerInVehicle(playerid,carroadmin[playerid],0);
if(
GetPlayerInterior(playerid))
LinkVehicleToInterior(carroadmin[playerid],GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carroadmin[playerid],GetPlayerVirtualWorld(playerid));
format(stringsizeof(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(playeridocdstring);
SendClientMessage(playeridocd"| INFO | Ao sair do veнculo ele serб automaticamente deletado!");
cVehicle[playerid] = true;
return 
1;
}
else
{
SendClientMessage(playeridVermelho"| ERRO | ID invбlido | ID's = 400-611");
return 
1;
}
}
}
return 
1;

Sу fazer a identaзгo
Reply
#3

Nгo deu certo
Reply
#4

testa

PHP код:
if(strcmp(cmd"/cv"true) == 0)
{
    new 
plid;
    new 
Float:X,Float:Y,Float:Z,Float:Angle;
    
tmp strtok(cmdtextidx);
    
plid strval(tmp);
    if(
pAdmin[playerid] == 0) return SendClientMessage(playerid, -1"vocк nгo tem permissгo");
    if(!
strlen(tmp)) return SendClientMessage(playeridVermelho"| ERRO | Digite: /cv [id-do-carro]");
    if(
plid == 594) return SendClientMessage(playeridVermelho"| ERRO | ID de carro Proibido!");
    if(
GetPlayerInterior(playerid))
    {
        
LinkVehicleToInterior(carroadmin[playerid],GetPlayerInterior(playerid));
        
SetVehicleVirtualWorld(carroadmin[playerid],GetPlayerVirtualWorld(playerid));
        
format(stringsizeof(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(playeridocdstring);
        
SendClientMessage(playeridocd"| INFO | Ao sair do veнculo ele serб automaticamente deletado!");
        
cVehicle[playerid] = true;
    }
    if(
plid >= 400 && plid <= 611)
    {
        
GetPlayerPos(playerid,X,Y,Z);
        
GetPlayerFacingAngle(playerid,Angle);
        
carroadmin[playerid] = CreateVehicle(plidXYZAngle, -1, -1120000);
        
SetVehicleNumberPlate(carroadmin[playerid], "CVO-Admin");
        
PutPlayerInVehicle(playerid,carroadmin[playerid],0);
    }
    else return 
SendClientMessage(playeridVermelho"| ERRO | ID invбlido | ID's = 400-611");
    return 
1;

Reply
#5

Kkk essa GM й sua?
Reply
#6

Aee deu certo agora eu tenho que usar o comando /deletcar pra excluir
Mais ficou bom vlw
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)