21.02.2018, 14:26
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;
}
}
}
}