GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: mr_rich - 2012. április 18. - 16:04:41

Cím: Parkolás parancs
Írta: mr_rich - 2012. április 18. - 16:04:41
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;
}
Cím: Parkolás parancs
Írta: bence67 - 2012. április 18. - 17:30:09
Szia!
Sztm
-Nincs hova mentse [Én pl nem látom hova menti ezt]
Ha mégse ez akkor gondolkozom még :)
Cím: Parkolás parancs
Írta: mr_rich - 2012. április 18. - 17:46:24
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