Jump to content

anakin29

Membru
  • Posts

    76
  • Joined

  • Last visited

    Never

Everything posted by anakin29

  1. tot samp si svr e pe 0.3d imi mergea dar dintr-o data nu mai merge
  2. incearca asta [pawn]if(strcmp(cmdtext, "/cs", true) == 0) if(strcmp(cmdtext, "/factions", true) == 0)[/pawn] Sau [pawn]if(strcmp(cmd, "/cs", true) == 0) if(strcmp(cmd, "/factions", true) == 0)[/pawn]
  3. pai nam vazut ca s-a facut update la sa-mp.com :|
  4. Buna ziua am si eu o problema deci am facut un svr de rp am si pwn si amx in gamemodes pornesc consola si merge totu perfect si cand intru in samp imi arata svr off-line si nu pot sa ma conectez pe el ce fac?Va rog ajutatima
  5. deci am windows 7 si cand am bagat comanda de la ice numi comprimeaza ADICA in loc sami arata erori sau warning sau nimic imi arata ca Nu functioneaza pawn si mi se inchide poza : Uploaded with ImageShack.us
  6. mersi mult ice esti de gasca Dar nu pot sal comprimes mi se bloceaza si dupaia mi se inchide :|
  7. dai /setstat bizkey id playerului si id bizului dupaia dai /open cand ai setat bizu si gata TOTU in server p.s: eu asa fac nu ma criticati (pe svr mele)
  8. Buna ziua am si eu 2 problema la comanda de motor: 1.Deci vreau sa nu mai apara /engine [on/off] adica cand dai /engine sa tio porneasca sau sa tio opreasca 2e un bug cand opresti motorul te da jos automat si cand intri inapoi nu te mai poti da jos CMD [pawn]dcmd_engine(playerid,params[]){ #pragma unused params if(IsPlayerConnected(playerid)){ if(!strlen(params)) return SendClientMessage(playerid, COLOR_WHITE, "[uSAGE]: /engine [on/off]"); new vehicle = GetPlayerVehicleID(playerid); if(strcmp(params,"on",true) == 0) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(Vehicle[vehicle][Engine] == 0) { GameTextForPlayer(playerid,"~W~Starting engine",3000,3); SetTimerEx("TurnOnEngine", MAX_START_TIME*1000, 0, "dd", playerid, vehicle); } } } if(strcmp(params,"off",true) == 0) { TurnOffEngine(playerid, vehicle); } } return true; }[/pawn] MA PUTETI AJUTA? MULTUMESC ANITICIPAT
  9. Buna ziua imi da vreo 19 warnings la comanda asta [pawn]//---------------------------------------------------------[VEHICLE]---------------------------------------------------- if(strcmp(cmd, "/v", true) == 0 || strcmp(cmd, "/vehicle", true) == 0) // By Ellis { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You need to login first ! "); return 1; } new x_nr[256]; x_nr = strtok(cmdtext, idx); if (!strlen( x_nr )) { SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]"); SendClientMessage(playerid, COLOR_WHITE, "Available names: park, lock(1-3), sell, sellto, color "); return 1; } if(strcmp(x_nr,"sell",true) == 0) { if(IsAtDealership(playerid)) { if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { GetPlayerName(playerid, sendername, sizeof(sendername)); new ownvehkey; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { ownvehkey = PlayerInfo[playerid][pPcarkey1]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; } else { return 1; } if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0) { new carsellprice = CarInfo[ownvehkey][cValue] / 4 * 3; new Float:x,Float:y,Float:z; new Float:a; CarInfo[ownvehkey][cOwned] = 0; strmid(CarInfo[ownvehkey][cOwner], "Dealership", 0, strlen("Dealership"), 999); GivePlayerMoney(playerid,carsellprice); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~You have sold your car for: ~n~~g~$%d", carsellprice); GameTextForPlayer(playerid, string, 10000, 3); GetVehiclePos(ownvehkey, x, y, z); GetVehicleZAngle(ownvehkey, a); CarInfo[ownvehkey][cLocationx] = x; CarInfo[ownvehkey][cLocationy] = y; CarInfo[ownvehkey][cLocationz] = z; CarInfo[ownvehkey][cAngle] = a; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { PlayerInfo[playerid][pPcarkey1] = 999; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { PlayerInfo[playerid][pPcarkey2] = 999; } RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); if(PlayerInfo[playerid][pLocal] == ownvehkey) { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,CarInfo[ownvehkey][cLocationx],CarInfo[ownvehkey][cLocationy],CarInfo[ownvehkey][cLocationz]); PlayerInfo[playerid][pInt] = 0; } OnPropUpdate(); OnPlayerUpdateEx(playerid); DestroyVehicle(ownvehkey); CreateVehicle(CarInfo[ownvehkey][cModel],CarInfo[ownvehkey][cLocationx],CarInfo[ownvehkey][cLocationy],CarInfo[ownvehkey][cLocationz]+1.0,CarInfo[ownvehkey][cAngle],CarInfo[ownvehkey][cColorOne],CarInfo[ownvehkey][cColorTwo],60000); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You have to sit at your own car to sell it! "); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "You are not at a dealership"); return 1; } } else if(strcmp(x_nr,"sellto",true) == 0) { if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { GetPlayerName(playerid, sendername, sizeof(sendername)); new ownvehkey; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { ownvehkey = PlayerInfo[playerid][pPcarkey1]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; } else { return 1; } if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(ProxDetectorS(8.0, playerid, giveplayerid)) { if(PlayerInfo[giveplayerid][pPcarkey1] == 999) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]"); return 1; } new price; price = strval(tmp); if(price < 1 || price > 1500000) { SendClientMessage(playerid, COLOR_GREY, " Price not lower then 1 and not higher then 1500000. "); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price); SendClientMessage(giveplayerid, COLOR_WHITE, string); OwnableCarOffer[giveplayerid] = playerid; OwnableCarID[giveplayerid] = ownvehkey; OwnableCarPrice[giveplayerid] = price; return 1; } else if(PlayerInfo[giveplayerid][pPcarkey2] == 999) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]"); return 1; } new price; price = strval(tmp); if(price < 1 || price > 1500000) { SendClientMessage(playerid, COLOR_GREY, " Price not lower then 1 and not higher then 1500000. "); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price); SendClientMessage(giveplayerid, COLOR_WHITE, string); OwnableCarOffer[giveplayerid] = playerid; OwnableCarID[giveplayerid] = ownvehkey; OwnableCarPrice[giveplayerid] = price; return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " Player is not near you ! "); return 1; } } } } else { SendClientMessage(playerid, COLOR_GREY, " This is not your car"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You have to sit at your own car to sell it"); return 1; } } else if(strcmp(x_nr,"park",true) == 0) { new Float:x,Float:y,Float:z; new Float:a; new carid; new getcarid; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { carid = PlayerInfo[playerid][pPcarkey1]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { carid = PlayerInfo[playerid][pPcarkey2]; } else { return 1; } getcarid = GetPlayerVehicleID(playerid); GetPlayerName(playerid, playername, sizeof(playername)); GetVehiclePos(carid, x, y, z); //GetPlayerFacingAngle(playerid, a); GetVehicleZAngle(carid, a); if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1) { if(PlayerInfo[playerid][pPcarkey1] == 999 && PlayerInfo[playerid][pPcarkey2] == 999) { SendClientMessage(playerid, COLOR_GREY, "You don't own a car."); return 1; } if(getcarid == carid) { CarInfo[carid][cLocationx] = x; CarInfo[carid][cLocationy] = y; CarInfo[carid][cLocationz] = z; CarInfo[carid][cAngle] = a; format(string, sizeof(string), "~n~ You have parked your vehicle in this location. ~n~"); GameTextForPlayer(playerid, "You have parked your vehicle in this position. It will respawn here.", 10000, 3); OnPropUpdate(); OnPlayerUpdateEx(playerid); DestroyVehicle(carid); CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000); TogglePlayerControllable(playerid, 1); return 1; } } } else if(strcmp(x_nr,"lock1",true) == 0) { new keycar = PlayerInfo[playerid][pPcarkey1]; if(keycar != 999) { new locked[256]; locked = strtok(cmdtext, idx); if(CarInfo[keycar][cLock] == 1) { for(new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(keycar,i,0,0); } } format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked"); GameTextForPlayer(playerid, string, 4000, 3); CarInfo[keycar][cLock] = 0; OnPropUpdate(); return 1; } else if(CarInfo[keycar][cLock] == 0) { for(new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(keycar,i,0,1); } } format(string, sizeof(string), "~w~Vehicle~n~~r~Locked"); GameTextForPlayer(playerid, string, 4000, 3); CarInfo[keycar][cLock] = 1; OnPropUpdate(); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You don't have a vehicle at slot 1"); return 1; } } else if(strcmp(x_nr,"lock2",true) == 0) { new keycar = PlayerInfo[playerid][pPcarkey2]; if(keycar != 999) { new locked[256]; locked = strtok(cmdtext, idx); if(CarInfo[keycar][cLock] == 1) { for(new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(keycar,i,0,0); } } format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked"); GameTextForPlayer(playerid, string, 4000, 3); CarInfo[keycar][cLock] = 0; OnPropUpdate(); return 1; } else if(CarInfo[keycar][cLock] == 0) { for(new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(keycar,i,0,1); } } format(string, sizeof(string), "~w~Vehicle~n~~r~Locked"); GameTextForPlayer(playerid, string, 4000, 3); CarInfo[keycar][cLock] = 1; OnPropUpdate(); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You don't have a vehicle at slot 2"); return 1; } } else if(strcmp(x_nr,"color",true) == 0) { if(PlayerInfo[playerid][pPcarkey1] == 999 && PlayerInfo[playerid][pPcarkey2] == 999) { SendClientMessage(playerid, COLOR_GREY," You don't have a vehicle to respray."); return 1; } if(GetPlayerMoney(playerid) < 1000) { SendClientMessage(playerid, COLOR_GREY," You don't have enough money for vehicle respray."); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v color [ColorOneID] [ColorTwoID]"); return 1; } new color1; color1 = strval(tmp); if(color1 < 0 && color1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Wrong color id!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v color [ColorOneID] [ColorTwoID]"); return 1; } new color2; color2 = strval(tmp); if(color2 < 0 && color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Wrong color id!"); return 1; } new vehid; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { vehid = PlayerInfo[playerid][pPcarkey1]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { vehid = PlayerInfo[playerid][pPcarkey2]; } else { return 1; } if(IsPlayerInVehicle(playerid, vehid)) { CarInfo[vehid][cColorOne] = color1; CarInfo[vehid][cColorTwo] = color2; GivePlayerMoney(playerid, -1000); GameTextForPlayer(playerid, "~w~Bill for a Paint Respray~n~~r~-$1000", 5000, 1); ChangeVehicleColor(vehid, color1, color2); OnPropUpdate(); OnPlayerUpdateEx(playerid); return 1; } else { SendClientMessage(playerid, COLOR_GREY," You are not in your vehicle."); return 1; } } else if(strcmp(x_nr,"buy",true) == 0) { if(IsAnOwnableCar(idcar)) { if(PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_GREY, "You need to be level 3 to buy a vehicle!"); return 1; } if(PlayerInfo[playerid][pPcarkey1] == 999) { } else if(PlayerInfo[playerid][pPcarkey2] == 999) { } else { SendClientMessage(playerid, COLOR_GREY, "Ai Deja 2 Masini"); return 1; } if(CarInfo[idcar][cOwned]==1) { SendClientMessage(playerid, COLOR_WHITE, "Cineva mai detine aceasta masina"); return 1; } if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue]) { if(PlayerInfo[playerid][pPcarkey1] == 999) { PlayerInfo[playerid][pPcarkey1] = idcar; } else if(PlayerInfo[playerid][pPcarkey2] == 999) { PlayerInfo[playerid][pPcarkey2] = idcar; } else { return 1; } CarInfo[idcar][cOwned] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999); GivePlayerMoney(playerid,-CarInfo[idcar][cValue]); PlayerPlayMusic(playerid); GameTextForPlayer(playerid, "~r~~h~Congratulations~n~~y~~h~Don't forget to /v park it!", 5000, 3); SendClientMessage(playerid, COLOR_WHITE, "Felicitari ti-ai cumparat o noua masina!"); SendClientMessage(playerid, COLOR_WHITE, "Scrie /vehiclehelp pentru manualul masini."); TogglePlayerControllable(playerid, 1); //SendClientMessage(playerid, COLOR_YELLOW2, "Acum poti porni motorul masinii apasand pe butonul cu care sari."); //gEngine[playerid] = 0; //engineOn[GetPlayerVehicleID(playerid)] = false; DateProp(playerid); OnPropUpdate(); OnPlayerUpdateEx(playerid); return 1; } else { SendClientMessage(playerid, COLOR_GREY, "You don't have enough cash with you ! "); return 1; } } } else { SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]"); SendClientMessage(playerid, COLOR_WHITE, "Available names: park, lock(1-3), sell, sellto, color"); return 1; } } return 1; }[/pawn] + ca nu merge comanda Warnings
  10. deci am o comanda /v (ehicles) si numi merge tot imi arata acelas lucrut ori ce as face cand dau /v buy imi arata HINT:/v(ehicle):park,sell,sellto,color ce fac ce are comanda de nu merge?:| [pawn] if(strcmp(cmd, "/v", true) == 0 || strcmp(cmd, "/vehicle", true) == 0) // By Ellis { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You need to login first ! "); return 1; } new x_nr[64]; if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]"); SendClientMessage(playerid, COLOR_WHITE, "Available names: park, lock(1-3), sell, sellto, color"); return 1; } if(strcmp(x_nr,"sell",true) == 0) { if(IsAtDealership(playerid)) { if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { GetPlayerName(playerid, sendername, sizeof(sendername)); new ownvehkey; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { ownvehkey = PlayerInfo[playerid][pPcarkey1]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; } else { return 1; } if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0) { new carsellprice = CarInfo[ownvehkey][cValue] / 4 * 3; new Float:x,Float:y,Float:z; new Float:a; CarInfo[ownvehkey][cOwned] = 0; strmid(CarInfo[ownvehkey][cOwner], "Dealership", 0, strlen("Dealership"), 999); GivePlayerMoney(playerid,carsellprice); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~You have sold your car for: ~n~~g~$%d", carsellprice); GameTextForPlayer(playerid, string, 10000, 3); GetVehiclePos(ownvehkey, x, y, z); GetVehicleZAngle(ownvehkey, a); CarInfo[ownvehkey][cLocationx] = x; CarInfo[ownvehkey][cLocationy] = y; CarInfo[ownvehkey][cLocationz] = z; CarInfo[ownvehkey][cAngle] = a; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { PlayerInfo[playerid][pPcarkey1] = 999; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { PlayerInfo[playerid][pPcarkey2] = 999; } RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); if(PlayerInfo[playerid][pLocal] == ownvehkey) { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,CarInfo[ownvehkey][cLocationx],CarInfo[ownvehkey][cLocationy],CarInfo[ownvehkey][cLocationz]); PlayerInfo[playerid][pInt] = 0; } OnPropUpdate(); OnPlayerUpdateEx(playerid); DestroyVehicle(ownvehkey); CreateVehicle(CarInfo[ownvehkey][cModel],CarInfo[ownvehkey][cLocationx],CarInfo[ownvehkey][cLocationy],CarInfo[ownvehkey][cLocationz]+1.0,CarInfo[ownvehkey][cAngle],CarInfo[ownvehkey][cColorOne],CarInfo[ownvehkey][cColorTwo],60000); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You have to sit at your own car to sell it! "); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "You are not at a dealership"); return 1; } } else if(strcmp(x_nr,"sellto",true) == 0) { if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { GetPlayerName(playerid, sendername, sizeof(sendername)); new ownvehkey; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { ownvehkey = PlayerInfo[playerid][pPcarkey1]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; } else { return 1; } if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(ProxDetectorS(8.0, playerid, giveplayerid)) { if(PlayerInfo[giveplayerid][pPcarkey1] == 999) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]"); return 1; } new price; price = strval(tmp); if(price < 1 || price > 1500000) { SendClientMessage(playerid, COLOR_GREY, " Price not lower then 1 and not higher then 1500000. "); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price); SendClientMessage(giveplayerid, COLOR_WHITE, string); OwnableCarOffer[giveplayerid] = playerid; OwnableCarID[giveplayerid] = ownvehkey; OwnableCarPrice[giveplayerid] = price; return 1; } else if(PlayerInfo[giveplayerid][pPcarkey2] == 999) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]"); return 1; } new price; price = strval(tmp); if(price < 1 || price > 1500000) { SendClientMessage(playerid, COLOR_GREY, " Price not lower then 1 and not higher then 1500000. "); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price); SendClientMessage(giveplayerid, COLOR_WHITE, string); OwnableCarOffer[giveplayerid] = playerid; OwnableCarID[giveplayerid] = ownvehkey; OwnableCarPrice[giveplayerid] = price; return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " Player is not near you ! "); return 1; } } } } else { SendClientMessage(playerid, COLOR_GREY, " This is not your car"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You have to sit at your own car to sell it"); return 1; } } else if(strcmp(x_nr,"park",true) == 0) { new Float:x,Float:y,Float:z; new Float:a; new carid; new getcarid; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { carid = PlayerInfo[playerid][pPcarkey1]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { carid = PlayerInfo[playerid][pPcarkey2]; } else { return 1; } getcarid = GetPlayerVehicleID(playerid); GetPlayerName(playerid, playername, sizeof(playername)); GetVehiclePos(carid, x, y, z); //GetPlayerFacingAngle(playerid, a); GetVehicleZAngle(carid, a); if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1) { if(PlayerInfo[playerid][pPcarkey1] == 999 && PlayerInfo[playerid][pPcarkey2] == 999) { SendClientMessage(playerid, COLOR_GREY, "You don't own a car."); return 1; } if(getcarid == carid) { CarInfo[carid][cLocationx] = x; CarInfo[carid][cLocationy] = y; CarInfo[carid][cLocationz] = z; CarInfo[carid][cAngle] = a; format(string, sizeof(string), "~n~ You have parked your vehicle in this location. ~n~"); GameTextForPlayer(playerid, "You have parked your vehicle in this position. It will respawn here.", 10000, 3); OnPropUpdate(); OnPlayerUpdateEx(playerid); DestroyVehicle(carid); CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000); TogglePlayerControllable(playerid, 1); return 1; } } } else if(strcmp(x_nr,"lock1",true) == 0) { new keycar = PlayerInfo[playerid][pPcarkey1]; if(keycar != 999) { new locked[256]; locked = strtok(cmdtext, idx); if(CarInfo[keycar][cLock] == 1) { foreach(Player, i) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(keycar,i,0,0); } } format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked"); GameTextForPlayer(playerid, string, 4000, 3); CarInfo[keycar][cLock] = 0; OnPropUpdate(); return 1; } else if(CarInfo[keycar][cLock] == 0) { foreach(Player, i) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(keycar,i,0,1); } } format(string, sizeof(string), "~w~Vehicle~n~~r~Locked"); GameTextForPlayer(playerid, string, 4000, 3); CarInfo[keycar][cLock] = 1; OnPropUpdate(); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You don't have a vehicle at slot 1"); return 1; } } else if(strcmp(x_nr,"lock2",true) == 0) { new keycar = PlayerInfo[playerid][pPcarkey2]; if(keycar != 999) { new locked[256]; locked = strtok(cmdtext, idx); if(CarInfo[keycar][cLock] == 1) { foreach(Player, i) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(keycar,i,0,0); } } format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked"); GameTextForPlayer(playerid, string, 4000, 3); CarInfo[keycar][cLock] = 0; OnPropUpdate(); return 1; } else if(CarInfo[keycar][cLock] == 0) { foreach(Player, i) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(keycar,i,0,1); } } format(string, sizeof(string), "~w~Vehicle~n~~r~Locked"); GameTextForPlayer(playerid, string, 4000, 3); CarInfo[keycar][cLock] = 1; OnPropUpdate(); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You don't have a vehicle at slot 2"); return 1; } } else if(strcmp(x_nr,"color",true) == 0) { if(PlayerInfo[playerid][pPcarkey1] == 999 && PlayerInfo[playerid][pPcarkey2] == 999) { SendClientMessage(playerid, COLOR_GREY," You don't have a vehicle to respray."); return 1; } if(GetPlayerMoney(playerid) < 1000) { SendClientMessage(playerid, COLOR_GREY," You don't have enough money for vehicle respray."); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v color [ColorOneID] [ColorTwoID]"); return 1; } new color1; color1 = strval(tmp); if(color1 < 0 && color1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Wrong color id!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v color [ColorOneID] [ColorTwoID]"); return 1; } new color2; color2 = strval(tmp); if(color2 < 0 && color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Wrong color id!"); return 1; } new vehid; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { vehid = PlayerInfo[playerid][pPcarkey1]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { vehid = PlayerInfo[playerid][pPcarkey2]; } else { return 1; } if(IsPlayerInVehicle(playerid, vehid)) { CarInfo[vehid][cColorOne] = color1; CarInfo[vehid][cColorTwo] = color2; GivePlayerMoney(playerid, -1000); GameTextForPlayer(playerid, "~w~Bill for a Paint Respray~n~~r~-$1000", 5000, 1); ChangeVehicleColor(vehid, color1, color2); OnPropUpdate(); OnPlayerUpdateEx(playerid); return 1; } else { SendClientMessage(playerid, COLOR_GREY," You are not in your vehicle."); return 1; } } else if(strcmp(x_nr,"buy",true) == 0) { if(IsAnOwnableCar(idcar)) { if(PlayerInfo[playerid][pLevel] < 6) { SendClientMessage(playerid, COLOR_GREY, "You need to be level 6 to buy a vehicle!"); return 1; } if(PlayerInfo[playerid][pPcarkey1] == 999) { } else if(PlayerInfo[playerid][pPcarkey2] == 999) { } else { SendClientMessage(playerid, COLOR_GREY, "Ai Deja 2 Masini"); return 1; } if(CarInfo[idcar][cOwned]==1) { SendClientMessage(playerid, COLOR_WHITE, "Cineva mai detine aceasta masina"); return 1; } if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue]) { if(PlayerInfo[playerid][pPcarkey1] == 999) { PlayerInfo[playerid][pPcarkey1] = idcar; } else if(PlayerInfo[playerid][pPcarkey2] == 999) { PlayerInfo[playerid][pPcarkey2] = idcar; } else { return 1; } CarInfo[idcar][cOwned] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999); GivePlayerMoney(playerid,-CarInfo[idcar][cValue]); PlayerPlayMusic(playerid); GameTextForPlayer(playerid, "~r~~h~Congratulations~n~~y~~h~Don't forget to /v park it!", 5000, 3); SendClientMessage(playerid, COLOR_WHITE, "Felicitari ti-ai cumparat o noua masina!"); SendClientMessage(playerid, COLOR_WHITE, "Scrie /carhelp pentru manualul masini."); TogglePlayerControllable(playerid, 1); //SendClientMessage(playerid, COLOR_YELLOW2, "Acum poti porni motorul masinii apasand pe butonul cu care sari."); //gEngine[playerid] = 0; //engineOn[GetPlayerVehicleID(playerid)] = false; DateProp(playerid); OnPropUpdate(); OnPlayerUpdateEx(playerid); return 1; } else { SendClientMessage(playerid, COLOR_GREY, "You don't have enough cash with you ! "); return 1; } } } else { SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]"); SendClientMessage(playerid, COLOR_WHITE, "Available names: park, lock(1-3), sell, sellto, color"); return 1; } } return 1; }[/pawn]
  11. Buna ziua am si eu o problema mare am un sistem de /v park,sell,sellto,etc si numi merge cand scriu /v park imi arata /v park,sell,sellto,etc si cand dau /v sell imi arata /v park,sell,sellto,etc tot ce fac asta imi arata /v park,sell,sellto,etc ma puteti ajuta va rog ? ce am gresit in comanda? [pawn] if(strcmp(cmd, "/v", true) == 0 || strcmp(cmd, "/vehicle", true) == 0) // By Ellis { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You need to login first ! "); return 1; } new x_nr[64]; if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]"); SendClientMessage(playerid, COLOR_WHITE, "Available names: park, lock(1-3), sell, sellto, color"); return 1; } if(strcmp(x_nr,"sell",true) == 0) { if(IsAtDealership(playerid)) { if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { GetPlayerName(playerid, sendername, sizeof(sendername)); new ownvehkey; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { ownvehkey = PlayerInfo[playerid][pPcarkey1]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; } else { return 1; } if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0) { new carsellprice = CarInfo[ownvehkey][cValue] / 4 * 3; new Float:x,Float:y,Float:z; new Float:a; CarInfo[ownvehkey][cOwned] = 0; strmid(CarInfo[ownvehkey][cOwner], "Dealership", 0, strlen("Dealership"), 999); GivePlayerMoney(playerid,carsellprice); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~You have sold your car for: ~n~~g~$%d", carsellprice); GameTextForPlayer(playerid, string, 10000, 3); GetVehiclePos(ownvehkey, x, y, z); GetVehicleZAngle(ownvehkey, a); CarInfo[ownvehkey][cLocationx] = x; CarInfo[ownvehkey][cLocationy] = y; CarInfo[ownvehkey][cLocationz] = z; CarInfo[ownvehkey][cAngle] = a; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { PlayerInfo[playerid][pPcarkey1] = 999; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { PlayerInfo[playerid][pPcarkey2] = 999; } RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); if(PlayerInfo[playerid][pLocal] == ownvehkey) { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,CarInfo[ownvehkey][cLocationx],CarInfo[ownvehkey][cLocationy],CarInfo[ownvehkey][cLocationz]); PlayerInfo[playerid][pInt] = 0; } OnPropUpdate(); OnPlayerUpdateEx(playerid); DestroyVehicle(ownvehkey); CreateVehicle(CarInfo[ownvehkey][cModel],CarInfo[ownvehkey][cLocationx],CarInfo[ownvehkey][cLocationy],CarInfo[ownvehkey][cLocationz]+1.0,CarInfo[ownvehkey][cAngle],CarInfo[ownvehkey][cColorOne],CarInfo[ownvehkey][cColorTwo],60000); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You have to sit at your own car to sell it! "); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "You are not at a dealership"); return 1; } } else if(strcmp(x_nr,"sellto",true) == 0) { if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { GetPlayerName(playerid, sendername, sizeof(sendername)); new ownvehkey; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { ownvehkey = PlayerInfo[playerid][pPcarkey1]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; } else { return 1; } if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(ProxDetectorS(8.0, playerid, giveplayerid)) { if(PlayerInfo[giveplayerid][pPcarkey1] == 999) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]"); return 1; } new price; price = strval(tmp); if(price < 1 || price > 1500000) { SendClientMessage(playerid, COLOR_GREY, " Price not lower then 1 and not higher then 1500000. "); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price); SendClientMessage(giveplayerid, COLOR_WHITE, string); OwnableCarOffer[giveplayerid] = playerid; OwnableCarID[giveplayerid] = ownvehkey; OwnableCarPrice[giveplayerid] = price; return 1; } else if(PlayerInfo[giveplayerid][pPcarkey2] == 999) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]"); return 1; } new price; price = strval(tmp); if(price < 1 || price > 1500000) { SendClientMessage(playerid, COLOR_GREY, " Price not lower then 1 and not higher then 1500000. "); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price); SendClientMessage(giveplayerid, COLOR_WHITE, string); OwnableCarOffer[giveplayerid] = playerid; OwnableCarID[giveplayerid] = ownvehkey; OwnableCarPrice[giveplayerid] = price; return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " Player is not near you ! "); return 1; } } } } else { SendClientMessage(playerid, COLOR_GREY, " This is not your car"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You have to sit at your own car to sell it"); return 1; } } else if(strcmp(x_nr,"park",true) == 0) { new Float:x,Float:y,Float:z; new Float:a; new carid; new getcarid; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { carid = PlayerInfo[playerid][pPcarkey1]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { carid = PlayerInfo[playerid][pPcarkey2]; } else { return 1; } getcarid = GetPlayerVehicleID(playerid); GetPlayerName(playerid, playername, sizeof(playername)); GetVehiclePos(carid, x, y, z); //GetPlayerFacingAngle(playerid, a); GetVehicleZAngle(carid, a); if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1) { if(PlayerInfo[playerid][pPcarkey1] == 999 && PlayerInfo[playerid][pPcarkey2] == 999) { SendClientMessage(playerid, COLOR_GREY, "You don't own a car."); return 1; } if(getcarid == carid) { CarInfo[carid][cLocationx] = x; CarInfo[carid][cLocationy] = y; CarInfo[carid][cLocationz] = z; CarInfo[carid][cAngle] = a; format(string, sizeof(string), "~n~ You have parked your vehicle in this location. ~n~"); GameTextForPlayer(playerid, "You have parked your vehicle in this position. It will respawn here.", 10000, 3); OnPropUpdate(); OnPlayerUpdateEx(playerid); DestroyVehicle(carid); CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000); TogglePlayerControllable(playerid, 1); return 1; } } } else if(strcmp(x_nr,"lock1",true) == 0) { new keycar = PlayerInfo[playerid][pPcarkey1]; if(keycar != 999) { new locked[256]; locked = strtok(cmdtext, idx); if(CarInfo[keycar][cLock] == 1) { foreach(Player, i) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(keycar,i,0,0); } } format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked"); GameTextForPlayer(playerid, string, 4000, 3); CarInfo[keycar][cLock] = 0; OnPropUpdate(); return 1; } else if(CarInfo[keycar][cLock] == 0) { foreach(Player, i) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(keycar,i,0,1); } } format(string, sizeof(string), "~w~Vehicle~n~~r~Locked"); GameTextForPlayer(playerid, string, 4000, 3); CarInfo[keycar][cLock] = 1; OnPropUpdate(); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You don't have a vehicle at slot 1"); return 1; } } else if(strcmp(x_nr,"lock2",true) == 0) { new keycar = PlayerInfo[playerid][pPcarkey2]; if(keycar != 999) { new locked[256]; locked = strtok(cmdtext, idx); if(CarInfo[keycar][cLock] == 1) { foreach(Player, i) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(keycar,i,0,0); } } format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked"); GameTextForPlayer(playerid, string, 4000, 3); CarInfo[keycar][cLock] = 0; OnPropUpdate(); return 1; } else if(CarInfo[keycar][cLock] == 0) { foreach(Player, i) { if (IsPlayerConnected(i)) { SetVehicleParamsForPlayer(keycar,i,0,1); } } format(string, sizeof(string), "~w~Vehicle~n~~r~Locked"); GameTextForPlayer(playerid, string, 4000, 3); CarInfo[keycar][cLock] = 1; OnPropUpdate(); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You don't have a vehicle at slot 2"); return 1; } } else if(strcmp(x_nr,"color",true) == 0) { if(PlayerInfo[playerid][pPcarkey1] == 999 && PlayerInfo[playerid][pPcarkey2] == 999) { SendClientMessage(playerid, COLOR_GREY," You don't have a vehicle to respray."); return 1; } if(GetPlayerMoney(playerid) < 1000) { SendClientMessage(playerid, COLOR_GREY," You don't have enough money for vehicle respray."); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v color [ColorOneID] [ColorTwoID]"); return 1; } new color1; color1 = strval(tmp); if(color1 < 0 && color1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Wrong color id!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v color [ColorOneID] [ColorTwoID]"); return 1; } new color2; color2 = strval(tmp); if(color2 < 0 && color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Wrong color id!"); return 1; } new vehid; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { vehid = PlayerInfo[playerid][pPcarkey1]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { vehid = PlayerInfo[playerid][pPcarkey2]; } else { return 1; } if(IsPlayerInVehicle(playerid, vehid)) { CarInfo[vehid][cColorOne] = color1; CarInfo[vehid][cColorTwo] = color2; GivePlayerMoney(playerid, -1000); GameTextForPlayer(playerid, "~w~Bill for a Paint Respray~n~~r~-$1000", 5000, 1); ChangeVehicleColor(vehid, color1, color2); OnPropUpdate(); OnPlayerUpdateEx(playerid); return 1; } else { SendClientMessage(playerid, COLOR_GREY," You are not in your vehicle."); return 1; } } else if(strcmp(x_nr,"buy",true) == 0) { if(IsAnOwnableCar(idcar)) { if(PlayerInfo[playerid][pLevel] < 6) { SendClientMessage(playerid, COLOR_GREY, "You need to be level 6 to buy a vehicle!"); return 1; } if(PlayerInfo[playerid][pPcarkey1] == 999) { } else if(PlayerInfo[playerid][pPcarkey2] == 999) { } else { SendClientMessage(playerid, COLOR_GREY, "Ai Deja 2 Masini"); return 1; } if(CarInfo[idcar][cOwned]==1) { SendClientMessage(playerid, COLOR_WHITE, "Cineva mai detine aceasta masina"); return 1; } if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue]) { if(PlayerInfo[playerid][pPcarkey1] == 999) { PlayerInfo[playerid][pPcarkey1] = idcar; } else if(PlayerInfo[playerid][pPcarkey2] == 999) { PlayerInfo[playerid][pPcarkey2] = idcar; } else { return 1; } CarInfo[idcar][cOwned] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999); GivePlayerMoney(playerid,-CarInfo[idcar][cValue]); PlayerPlayMusic(playerid); GameTextForPlayer(playerid, "~r~~h~Congratulations~n~~y~~h~Don't forget to /v park it!", 5000, 3); SendClientMessage(playerid, COLOR_WHITE, "Felicitari ti-ai cumparat o noua masina!"); SendClientMessage(playerid, COLOR_WHITE, "Scrie /carhelp pentru manualul masini."); TogglePlayerControllable(playerid, 1); //SendClientMessage(playerid, COLOR_YELLOW2, "Acum poti porni motorul masinii apasand pe butonul cu care sari."); //gEngine[playerid] = 0; //engineOn[GetPlayerVehicleID(playerid)] = false; DateProp(playerid); OnPropUpdate(); OnPlayerUpdateEx(playerid); return 1; } else { SendClientMessage(playerid, COLOR_GREY, "You don't have enough cash with you ! "); return 1; } } } else { SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]"); SendClientMessage(playerid, COLOR_WHITE, "Available names: park, lock(1-3), sell, sellto, color"); return 1; } } return 1; }[/pawn]
  12. [pawn]#define PlayAudioStreamForPlayer #define StopAudioStreamForPlayer[/pawn]
  13. Buna ziua am si eu un gen de Speedometer si numi merge fuelul ma puteti ajuta oare ce am gresit? [pawn]#undef MAX_PLAYERS #define MAX_PLAYERS 500 //You must enter here the number of slots to optimize loops. new Text:bg_speedo; new Text:speedo_txd; new Text:speedo_fuel[MAX_PLAYERS]; new Text:speedo_vel[MAX_PLAYERS]; new checkgastimer; #define GasMax 100 #define RunOutTime 15000 #define RefuelWait 5000 #define CAR_AMOUNT 700 //Change to Your Vehicle Amount new Gas[CAR_AMOUNT]; new NoFuel[MAX_PLAYERS]; new gGas[MAX_PLAYERS]; forward IsAPlane(carid); new speedo_color[5] = { 0xffffffff, 0x00ffffff, 0xff00ffff, 0xffff00ff, 0x0000ffff }; public OnFilterScriptInit() { bg_speedo = TextDrawCreate(547.000000, 365.000000, "_~n~_~n~_~n~_~n~_~n~_~n~"); TextDrawBackgroundColor(bg_speedo, 255); TextDrawFont(bg_speedo, 1); TextDrawLetterSize(bg_speedo, 0.500000, 1.000000); TextDrawColor(bg_speedo, -1); TextDrawSetOutline(bg_speedo, 0); TextDrawSetProportional(bg_speedo, 1); TextDrawSetShadow(bg_speedo, 1); TextDrawUseBox(bg_speedo, 1); TextDrawBoxColor(bg_speedo, 255); TextDrawTextSize(bg_speedo, 610.000000, 110.000000); speedo_txd = TextDrawCreate(530.000000, 342.000000, "samaps:mspmeter"); TextDrawBackgroundColor(speedo_txd, 255); TextDrawFont(speedo_txd, 4); TextDrawLetterSize(speedo_txd, 0.500000, 1.000000); TextDrawColor(speedo_txd, 16777215); TextDrawSetOutline(speedo_txd, 0); TextDrawSetProportional(speedo_txd, 1); TextDrawSetShadow(speedo_txd, 1); TextDrawUseBox(speedo_txd, 1); TextDrawBoxColor(speedo_txd, 255); TextDrawTextSize(speedo_txd, 100.000000, 100.000000); for(new i=0; i< MAX_PLAYERS; i++) { speedo_fuel = TextDrawCreate(564.000000, 376.000000, "100"); TextDrawBackgroundColor(speedo_fuel, 255); TextDrawFont(speedo_fuel, 1); TextDrawLetterSize(speedo_fuel, 0.500000, 1.000000); TextDrawColor(speedo_fuel, -1); TextDrawSetOutline(speedo_fuel, 0); TextDrawSetProportional(speedo_fuel, 1); TextDrawSetShadow(speedo_fuel, 0); speedo_vel = TextDrawCreate(570.000000, 398.000000, "100"); TextDrawBackgroundColor(speedo_vel, 255); TextDrawFont(speedo_vel, 1); TextDrawLetterSize(speedo_vel, 0.390000, 0.799999); TextDrawColor(speedo_vel, -16776961); TextDrawSetOutline(speedo_vel, 0); TextDrawSetProportional(speedo_vel, 1); TextDrawSetShadow(speedo_vel, 0); } return 1; } public OnFilterScriptExit() { for(new i; i < MAX_PLAYERS; i++) { TextDrawDestroy(speedo_fuel); TextDrawDestroy(speedo_vel); } TextDrawDestroy(speedo_txd); TextDrawDestroy(bg_speedo); return 1; } public OnPlayerDeath(playerid) { TextDrawHideForPlayer(playerid, bg_speedo); TextDrawHideForPlayer(playerid, speedo_txd); TextDrawHideForPlayer(playerid, speedo_fuel[playerid]); TextDrawHideForPlayer(playerid, speedo_vel[playerid]); return 1; } public OnPlayerDisconnect(playerid) { TextDrawHideForPlayer(playerid, bg_speedo); TextDrawHideForPlayer(playerid, speedo_txd); TextDrawHideForPlayer(playerid, speedo_fuel[playerid]); TextDrawHideForPlayer(playerid, speedo_vel[playerid]); return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER) { TextDrawColor(speedo_txd, speedo_color[random(sizeof speedo_color)]); TextDrawShowForPlayer(playerid, bg_speedo); TextDrawShowForPlayer(playerid, speedo_txd); TextDrawShowForPlayer(playerid, speedo_fuel[playerid]); TextDrawShowForPlayer(playerid, speedo_vel[playerid]); } if(newstate == PLAYER_STATE_ONFOOT) { TextDrawHideForPlayer(playerid, bg_speedo); TextDrawHideForPlayer(playerid, speedo_txd); TextDrawHideForPlayer(playerid, speedo_fuel[playerid]); TextDrawHideForPlayer(playerid, speedo_vel[playerid]); } return 1; } new Float:vFuel; new vID; new str[150]; public OnPlayerUpdate(playerid) { if(IsPlayerInAnyVehicle(playerid)) { vID = GetPlayerVehicleID(playerid); GetVehicleHealth(vID, vFuel); format(str, sizeof(str), "%d", floatround(((vFuel - 250) * 100) / 750)); TextDrawSetString(speedo_fuel[playerid], str); format(str, sizeof(str), "%d", GetVehSpeed(vID)); TextDrawSetString(speedo_vel[playerid], str); } return 1; } stock GetVehSpeed(vehid) // By Diler { new Float:X, Float:Y, Float:Z; GetVehicleVelocity(vehid, X, Y, Z); return floatround(floatsqroot(floatpower(X, 2) + floatpower(Y, 2) + floatpower(Z, 2)) * 200); } public CheckGas() { new string[256]; for(new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) { new vehicle = GetPlayerVehicleID(i); if(Gas[vehicle] >= 1) { if(Gas[vehicle] <= 10) { PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); } if(gGas == 1) { format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ %d%",Gas[vehicle]); GameTextForPlayer(i,string,15500,3); } Gas[vehicle]--; } else { NoFuel = 1; TogglePlayerControllable(i, 0); GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~No fuel in Vehicle~n~Use /exit to leave the vehicle",1500,3); } } } } return 1; }[/pawn]
  14. Buna ziua am si eu 2 probleme la care nu ma descurc de loc PROBLEMA 1:Nu stiu cum sa mut benzina si sa fac speedometer : Poza: Si sa arata asa: Si unde e e 100 cu al sa fie benzina nu damage puteti sa ma ajutati va rog eu mult? Problema 2 Cum pot scapa de asta adica cand intri sa nu tio mai dea doar cand mori si te da la spital atat si nu cnad intri pe svr sau te respawnaza adminu (DOC: factura ta este....): [img width=500 height=375]http://img638.imageshack.us/img638/8236/samp060ny.png
  15. Buna ziua am un sistem de payday si nu stiu cum sa dau sa dea mai putin la salariu adica el la salariu da vreo 1100 de dolari si eu vreau sa dea cand nu ai job 100 de dolari si cand ai job 400 de dolari cum pot face asta?
  16. Erorile clasice :| [pawn]C:\Users\user\Desktop\Sv samp 0\pawno\include\JunkBuster.inc(3237) : warning 201: redefinition of constant/macro (symbol "OnPlayerEnterRaceCheckpoint") C:\Users\user\Desktop\Sv samp 0\gamemodes\RO-RP.pwn(17) : error 021: symbol already defined: "PlayAudioStreamForPlayer" C:\Users\user\Desktop\Sv samp 0\gamemodes\RO-RP.pwn(2778) : warning 215: expression has no effect C:\Users\user\Desktop\Sv samp 0\gamemodes\RO-RP.pwn(13449) : warning 219: local variable "mod" shadows a variable at a preceding level C:\Users\user\Desktop\Sv samp 0\gamemodes\RO-RP.pwn(39937) : warning 204: symbol is assigned a value that is never used: "string2" C:\Users\user\Desktop\Sv samp 0\gamemodes\RO-RP.pwn(39936) : warning 204: symbol is assigned a value that is never used: "string" C:\Users\user\Desktop\Sv samp 0\gamemodes\RO-RP.pwn(41907) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. [/pawn]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.