Szerző Téma: Parkolás parancs  (Megtekintve 1248 alkalommal)

Parkolás parancs
« Dátum: 2012. Április 18. - 16:04:41 »
0 Show voters
Sziasztok. Próbáltam megírni egy parkolási parancsot de sehogy nem jön össze, már megannyiszor nekifutottam de semmi.
 

CMD:vpark(playerid)
{
    new pName[MAX_PLAYER_NAME],Float:x,Float:y,Float:z,Float:a;
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    if(PlayerInfo[playerid][VehP]!=1) return SendClientMessage(playerid,COLOR_ERROR,\"You have not car!\");
    for(new vehid=0;vehid<MAX_BVEHICLES;vehid++)
{
    if(IsPlayerInVehicle(playerid,PlayerInfo[playerid][pVehicleID]))
    {
   if(PlayerInfo[playerid][pVehicleID] != GetPlayerVehicleID(playerid)) return SendClientMessage(playerid,COLOR_ERROR,\"This is not your car!\");
   GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
   GetVehicleZAngle(GetPlayerVehicleID(playerid),a);
   VehicleInfo[vehid][vSpawnX]=x;
   VehicleInfo[vehid][vSpawnY]=y;
   VehicleInfo[vehid][vSpawnZ]=z;
   VehicleInfo[vehid][vAngle]=a;
   SaveVehicles(vehid);
   SendClientMessage(playerid,COLOR_GREEN,\"You parked your vehicle\");
   printf(\" %s parked the car to X: %f Y: %f Z: %f, ID: %d\",pName,VehicleInfo[vehid][vSpawnX], VehicleInfo[vehid][vSpawnY], VehicleInfo[vehid][vSpawnZ],vehid);
}
}
return 1;
}

Parkolás parancs
« Válasz #1 Dátum: 2012. Április 18. - 17:30:09 »
0 Show voters
Szia!
Sztm
-Nincs hova mentse [Én pl nem látom hova menti ezt]
Ha mégse ez akkor gondolkozom még :)

Parkolás parancs
« Válasz #2 Dátum: 2012. Április 18. - 17:46:24 »
0 Show voters
a hiba ott van, hogy nem tudom annak a kocsinak az IDjét lekérni amelyik a játékos kocsija, és igy hiába ülök bele a jármûbe és írom be a parancsot nem parkolja oda

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal