Problema intalnita (descriere): Am un sistem de mașini personale merge tot sistemu înafară de comanda /park ... Când tastezi /park îmi zice „You don't own a car” Eu pot intra în mașină dar altcineva nu că zice că este a mea dar comanda /park zice altceva... Ero(area / rile) / warning-(ul / urile): Nu este nici o eroare și nici un warning Liniile de cod / sursa / script-ul(obligatoriu):
if(strcmp(cmd, "/park", true) == 0 )
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pCar] == 9999)
{
SendClientMessage(playerid, COLOR_GREY, "You don't own a car."); // Aici cred.
return 1;
}
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new carid = GetPlayerVehicleID(playerid);
if(carid == PlayerInfo[playerid][pCar] || carid == PlayerInfo[playerid][pCar2] || PlayerInfo[playerid][pAdmin] >= 1338)
{
new Float:x,Float:y,Float:z;
new Float:a;
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
GetVehicleZAngle(carid, a);
CarInfo[carid][cLocationx] = x;
CarInfo[carid][cLocationy] = y;
CarInfo[carid][cLocationz] = z;
CarInfo[carid][cAngle] = a;
format(string, sizeof(string), "{FFFFFF}Masina ta a fost salvata {FF3333}Tine minte !Dupa restart va fi spawnata aici!");
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
SaveCar(carid); LoadComponents(carid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You're not in your car.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You're not in a car.");
return 1;
}
}
return 1;
}
Imagini / Video (optional): Ati incercat sa rezolvati singur?: Nu , n-am încercat...