Jump to content

Regenesisbossu

Membru
  • Posts

    11
  • Joined

  • Last visited

    Never

Everything posted by Regenesisbossu

  1. Am un sistem de masiin personale , si mereu cand bag o masina din gm se inverseaza id la masini
  2. Cum fac sa nu se mai inverseze masinile
  3. Uite aici sistemul meu de "/v" gasesti mai jos comanda /v tow [pawn] if(strcmp(cmd, "/v", true) == 0 || strcmp(cmd, "/vehicle", true) == 0) { if(IsPlayerConnected(playerid)) { new x_nr[64]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]"); SendClientMessage(playerid, COLOR_WHITE, "Available names: lock(1-3), sell, sellto, color, setplate, locate(1-3), tow(1-3)"); return 1; } if(PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_LIGHTGREEN, " You must be level 5 to use this!"); return 1; } if(strcmp(x_nr,"sell",true) == 0) { if(IsAtDealership(playerid)) { if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { GetPlayerName(playerid, sendername, sizeof(sendername)); new ownvehkey; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { ownvehkey = PlayerInfo[playerid][pPcarkey]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { ownvehkey = PlayerInfo[playerid][pPcarkey3]; } 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; CarInfo[ownvehkey][mod1] = 0; CarInfo[ownvehkey][mod2] = 0; CarInfo[ownvehkey][mod3] = 0; CarInfo[ownvehkey][mod4] = 0; CarInfo[ownvehkey][mod5] = 0; CarInfo[ownvehkey][mod6] = 0; CarInfo[ownvehkey][mod7] = 0; CarInfo[ownvehkey][mod8] = 0; CarInfo[ownvehkey][mod9] = 0; CarInfo[ownvehkey][mod10] = 0; CarInfo[ownvehkey][mod11] = 0; CarInfo[ownvehkey][mod12] = 0; CarInfo[ownvehkey][mod13] = 0; CarInfo[ownvehkey][mod14] = 0; CarInfo[ownvehkey][mod15] = 0; CarInfo[ownvehkey][mod16] = 0; CarInfo[ownvehkey][mod17] = 0; CarInfo[ownvehkey][paintjob] = -1; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { PlayerInfo[playerid][pPcarkey] = -1; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { PlayerInfo[playerid][pPcarkey2] = -1; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { PlayerInfo[playerid][pPcarkey3] = -1; } RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); format(CarInfo[vehid][cLicense], 32 ,"ForSale"); SetVehicleNumberPlate(vehid,CarInfo[vehid][cLicense]); OnPropUpdate(); SavePlayerData(playerid); DestroyVehicle(ownvehkey); new thiscar = 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); LoadComponents(thiscar); 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,"buy",true) == 0) { if(IsAnOwnableCar(idcar)) { if(PlayerInfo[playerid][pPcarkey] == -1) { } else if(PlayerInfo[playerid][pPcarkey2] == -1) { } else if(PlayerInfo[playerid][pPcarkey3] == -1) { } else { SendClientMessage(playerid, COLOR_GREY, "Ai deja 3 masini"); return 1; } if(CarInfo[idcar][cOwned]==1) { SendClientMessage(playerid, COLOR_GREY, "Someone already owns this car"); return 1; } if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue]) { if(PlayerInfo[playerid][pPcarkey] == -1) { PlayerInfo[playerid][pPcarkey] = idcar; } else if(PlayerInfo[playerid][pPcarkey2] == -1) { PlayerInfo[playerid][pPcarkey2] = idcar; } else if(PlayerInfo[playerid][pPcarkey3] == -1) { PlayerInfo[playerid][pPcarkey3] = 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]); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); GameTextForPlayer(playerid, "~w~Felicitari~n~Nu uita sa o parchezi cu /v park!", 5000, 3); SendClientMessage(playerid, COLOR_GRAD2, "Felicitari ti-ai cumparat o masina noua!"); TogglePlayerControllable(playerid, 1); OnPropUpdate(); SavePlayerData(playerid); return 1; } else { SendClientMessage(playerid, COLOR_GREY, " You don't have enough cash with you ! "); return 1; } } } else if(strcmp(x_nr,"sellto",true) == 0) { if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { GetPlayerName(playerid, sendername, sizeof(sendername)); new ownvehkey; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { ownvehkey = PlayerInfo[playerid][pPcarkey]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { ownvehkey = PlayerInfo[playerid][pPcarkey3]; } 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][pPcarkey] == -1) { 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 /acceptcar 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] == -1) { 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 /acceptcar 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][pPcarkey3] == -1) { 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 /acceptcar 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 has 3 cars already ! "); 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][pPcarkey]) { carid = PlayerInfo[playerid][pPcarkey]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { carid = PlayerInfo[playerid][pPcarkey2]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { carid = PlayerInfo[playerid][pPcarkey3]; } else { return 1; } getcarid = GetPlayerVehicleID(playerid); GetPlayerName(playerid, playername, sizeof(playername)); GetVehiclePos(carid, x, y, z); GetVehicleZAngle(carid, a); if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1) { if(PlayerInfo[playerid][pPcarkey] == -1 && PlayerInfo[playerid][pPcarkey2] == -1 && PlayerInfo[playerid][pPcarkey3] == -1) { SendClientMessage(playerid, COLOR_GREY, "You don't own a car."); return 1; } if(getcarid == carid) { new Float:CarHP, Float:OldCarHP; new panels,doors,lights,tires; CarInfo[carid][cLocationx] = x; CarInfo[carid][cLocationy] = y; CarInfo[carid][cLocationz] = z; CarInfo[carid][cAngle] = a; GetVehicleDamageStatus(carid,panels,doors,lights,tires); GetVehicleHealth(carid, CarHP); OldCarHP = CarHP; 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(); SavePlayerData(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); LoadComponents(carid); PutPlayerInVehicle(playerid,carid,0); SetVehicleHealth(carid, OldCarHP); UpdateVehicleDamageStatus(carid,panels,doors,lights,tires); TogglePlayerControllable(playerid, 1); return 1; } } } else if(strcmp(x_nr,"setplate",true) == 0) { if(IsPlayerInVehicle(playerid, vehid) || PlayerInfo[vehid][pPcarkey] != -1 && PlayerInfo[vehid][pPcarkey2] != -1 && PlayerInfo[vehid][pPcarkey3] != -1) { if(cmdtext[idx++] != 32 || cmdtext[idx] == EOS) { SendClientMessage(playerid,0xFFFFFFAA,"{00A1FF}USAGE{FFFFFF}: /v setplate [newplate]"); return 1; } new Float:XX,Float:YY,Float:ZZ,Float:AA; new Float:CarHP, Float:OldCarHP; new panels,doors,lights,tires; GetVehicleHealth(vehid, CarHP); GetVehicleDamageStatus(vehid,panels,doors,lights,tires); OldCarHP = CarHP; format(CarInfo[vehid][cLicense], 32 ,"%s",cmdtext[idx]); SetVehicleNumberPlate(vehid,CarInfo[vehid][cLicense]); GetVehiclePos(vehid,XX,YY,ZZ); GetVehicleZAngle(vehid, AA); SetVehicleToRespawn(vehid); SetVehiclePos(vehid,XX,YY,ZZ); SetVehicleZAngle(vehid, AA); PutPlayerInVehicle(playerid,vehid,0); SetVehicleHealth(vehid, OldCarHP); UpdateVehicleDamageStatus(vehid,panels,doors,lights,tires); format(string, sizeof(string), "{FFFF00}You have set your vehicle's plate to:{FFFFFF} %s", CarInfo[vehid][cLicense]); SendClientMessage(playerid, 0xFFFFFFFF, string); OnPropUpdate(); SavePlayerData(playerid); } else { SendClientMessage(playerid, 0xFFFFFFAA, "Nu esti in masina ta personala pentru a putea schimba NR de Inmatriculare."); return 1; } } else if(strcmp(x_nr,"lock1",true) == 0) { new keycar = PlayerInfo[playerid][pPcarkey]; if(keycar != -1) { 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(); SavePlayerData(playerid); 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(); SavePlayerData(playerid); 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 != -1) { 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(); SavePlayerData(playerid); 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(); SavePlayerData(playerid); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You don't have a vehicle at slot 2"); return 1; } } else if(strcmp(x_nr,"lock3",true) == 0) { new keycar = PlayerInfo[playerid][pPcarkey3]; if(keycar != -1) { 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(); SavePlayerData(playerid); 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(); SavePlayerData(playerid); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You don't have a vehicle at slot 3"); return 1; } } else if(strcmp(x_nr,"color",true) == 0) { if(PlayerInfo[playerid][pPcarkey] == -1 && PlayerInfo[playerid][pPcarkey2] == -1 && PlayerInfo[playerid][pPcarkey3] == -1) { 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, "{00A1FF}USAGE{FFFFFF}: /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, "{00A1FF}USAGE{FFFFFF}: /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; } if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { vehid = PlayerInfo[playerid][pPcarkey]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { vehid = PlayerInfo[playerid][pPcarkey2]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { vehid = PlayerInfo[playerid][pPcarkey3]; } else { return 1; } if(IsPlayerInVehicle(playerid, vehid)) { CarInfo[vehid][cColorOne] = color1; CarInfo[vehid][cColorTwo] = color2; GivePlayerMoney(playerid, -1000); ChangeVehicleColor(vehid, color1, color2); OnPropUpdate(); SavePlayerData(playerid); GameTextForPlayer(playerid, "~w~Bill for a Paint Respray~n~~r~-$1000", 5000, 1); return 1; } else { SendClientMessage(playerid, COLOR_GREY," You are not in your vehicle."); return 1; } } else if(strcmp(x_nr,"locate1",true) == 0) { if(!IsPlayerConnected(playerid)) { return 1; } new Float:x,Float:y,Float:z; new car = PlayerInfo[playerid][pPcarkey]; if(PlayerInfo[playerid][pPcarkey]==-1) { GameTextForPlayer(playerid, "~w~Nu ai o masina pentru a putea fi localizata", 2500, 3); return 1; } SendClientMessage(playerid,COLOR_WHITE,"Locatia masinii a fost gasita."); GetVehiclePos(car, x, y, z); SetPlayerCheckpoint(playerid, x, y, z, 6); return 1; } else if(strcmp(x_nr,"locate2",true) == 0) { if(!IsPlayerConnected(playerid)) { return 1; } new Float:x,Float:y,Float:z; new car = PlayerInfo[playerid][pPcarkey2]; if(PlayerInfo[playerid][pPcarkey]==-1) { GameTextForPlayer(playerid, "~w~Nu ai o masina pentru a putea fi localizata", 2500, 3); return 1; } SendClientMessage(playerid,COLOR_WHITE,"Locatia masinii a fost gasita."); GetVehiclePos(car, x, y, z); SetPlayerCheckpoint(playerid, x, y, z, 6); return 1; } else if(strcmp(x_nr,"locate3",true) == 0) { if(!IsPlayerConnected(playerid)) { return 1; } new Float:x,Float:y,Float:z; new car = PlayerInfo[playerid][pPcarkey3]; if(PlayerInfo[playerid][pPcarkey]==-1) { GameTextForPlayer(playerid, "~w~Nu ai o masina pentru a putea fi localizata", 2500, 3); return 1; } SendClientMessage(playerid,COLOR_WHITE,"Locatia masinii a fost gasita."); GetVehiclePos(car, x, y, z); SetPlayerCheckpoint(playerid, x, y, z, 6); return 1; } else if(strcmp(x_nr,"tow1",true) == 0) { if(IsPlayerConnected(playerid)) { new car = PlayerInfo[playerid][pPcarkey]; GetPlayerName(playerid, playername, sizeof(playername)); if (car != -1 && strcmp(playername, CarInfo[PlayerInfo[playerid][pPcarkey]][cOwner], true) == 0) { GameTextForPlayer(playerid, "~w~Masina a fost~n~~g~Tractata cu succes~n~~r~$-1500", 5000, 1); GivePlayerMoney(playerid,-1500); SetVehicleToRespawn(car); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); } else { GameTextForPlayer(playerid, "~w~Nu detii o masina personala.", 5000, 1); } } } else if(strcmp(x_nr,"tow2",true) == 0) { if(IsPlayerConnected(playerid)) { new car = PlayerInfo[playerid][pPcarkey2]; GetPlayerName(playerid, playername, sizeof(playername)); if (car != -1 && strcmp(playername, CarInfo[PlayerInfo[playerid][pPcarkey2]][cOwner], true) == 0) { GameTextForPlayer(playerid, "~w~Masina a fost~n~~g~Tractata cu succes~n~~r~$-1500", 5000, 1); GivePlayerMoney(playerid,-1500); SetVehicleToRespawn(car); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); } else { GameTextForPlayer(playerid, "~w~Nu detii o masina personala.", 5000, 1); } } } else if(strcmp(x_nr,"tow3",true) == 0) { if(IsPlayerConnected(playerid)) { new car = PlayerInfo[playerid][pPcarkey3]; GetPlayerName(playerid, playername, sizeof(playername)); if (car != -1 && strcmp(playername, CarInfo[PlayerInfo[playerid][pPcarkey3]][cOwner], true) == 0) { GameTextForPlayer(playerid, "~w~Masina a fost~n~~g~Tractata cu succes~n~~r~$-1500", 5000, 1); GivePlayerMoney(playerid,-1500); SetVehicleToRespawn(car); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); } else { GameTextForPlayer(playerid, "~w~Nu detii o masina personala.", 5000, 1); } } } else { SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]"); SendClientMessage(playerid, COLOR_WHITE, "Available names: park, lock(1-3), sell, sellto, color, setplate, locate(1-3), tow(1-3)"); return 1; } } return 1; }[/pawn]
  4. AddStaticPickup(1318, 23, 725.4284,-1449.3859,17.6953);// Cuneo enter Asa e la mine sageata la un hq, schimbi tu coordonatele in locul unde vrei sa apara
  5. Salut cand dau /find pe o persoana in miscare ramane checkpointul in acel loc cum as putea face sa se duca checkpointul dupa persoana respectiva [pawn] if(strcmp(cmd, "/find", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pJob] != 1) { SendClientMessage(playerid, COLOR_GREY, " You are not a Detective !"); return 1; } if(PlayerOnMission[playerid] > 0) { SendClientMessage(playerid, COLOR_GREY, " On a mission right now, can't use this command !"); return 1; } if(UsedFind[playerid] != 0 && PlayerInfo[playerid][pDetSkill] < 401) { SendClientMessage(playerid, COLOR_GREY, " You've already searched for someone, wait 2 minutes !"); return 1; } if(IsAtStuntEvent[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, "Nu poti folosi /find atata timp cat esti la stunt event. /stopstuntevent"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /find [playerid/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Find yourself!"); return 1; } new points; new level = PlayerInfo[playerid][pDetSkill]; if(level >= 0 && level <= 50) { points = 4; } else if(level >= 51 && level <= 100) { points = 6; } else if(level >= 101 && level <= 200) { points = 8; } else if(level >= 201 && level <= 400) { points = 10; } else if(level >= 401) { points = 12; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); new Float:X,Float:Y,Float:Z; GetPlayerPos(giveplayerid, X,Y,Z); SetPlayerCheckpoint(playerid, X,Y,Z, 6); FindTime[playerid] = 1; FindTimePoints[playerid] = points; PlayerInfo[playerid][pDetSkill] ++; UsedFind[playerid] = 1; if(PlayerInfo[playerid][pDetSkill] == 50) { SendClientMessage(playerid, COLOR_YELLOW, "* Your Detective Skill is now Level 2, soon you are able to find Faction Members."); } else if(PlayerInfo[playerid][pDetSkill] == 100) { SendClientMessage(playerid, COLOR_YELLOW, "* Your Detective Skill is now Level 3, soon you are able to find Faction Members."); } else if(PlayerInfo[playerid][pDetSkill] == 200) { SendClientMessage(playerid, COLOR_YELLOW, "* Your Detective Skill is now Level 4, you are now able to find Faction Members."); } else if(PlayerInfo[playerid][pDetSkill] == 400) { SendClientMessage(playerid, COLOR_YELLOW, "* Your Detective Skill is now Level 5, you are now able to find Faction Members."); } } } else { SendClientMessage(playerid, COLOR_GREY, " Invalid Name/ID !"); } } return 1; }[/pawn]
  6. Aratane linile
  7. Cand casa e incuiata nu pot iesi din ea cu comanda /exit.. doar cand e descuiata pot iesi cu /exit Comanda open: [pawn] if(strcmp(cmd, "/open", true) == 0) { if(IsPlayerConnected(playerid)) { for(new i = 0; i < sizeof(HouseInfo); i++) { if (PlayerToPoint(3, playerid,HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]) || PlayerToPoint(3, playerid,HouseInfo[hExitx], HouseInfo[hExity], HouseInfo[hExitz])) { if(PlayerInfo[playerid][pPhousekey] == i) { if(HouseInfo[hLock] == 1) { HouseInfo[hLock] = 0; GameTextForPlayer(playerid, "~w~UnLocked", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } if(HouseInfo[hLock] == 0) { HouseInfo[hLock] = 1; GameTextForPlayer(playerid, "~w~Locked", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } } else { GameTextForPlayer(playerid, "~r~You are not la House", 5000, 6); return 1; } } } for(new i = 0; i < sizeof(Cazino); i++) { if (PlayerToPoint(3, playerid,-1754.1101,962.4252,24.8828)) { if(PlayerInfo[playerid][pAdmin] >= 1338) { if(Cazino[czLocked] == 1) { Cazino[czLocked] = 0; GameTextForPlayer(playerid, "~w~Casino ~g~Opened", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } if(Cazino[czLocked] == 0) { Cazino[czLocked] = 1; GameTextForPlayer(playerid, "~w~Casino ~r~Closed", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } } else { GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6); return 1; } } } for(new i = 0; i < sizeof(BizzInfo); i++) { if (PlayerToPoint(3, playerid,BizzInfo[bEntranceX], BizzInfo[bEntranceY], BizzInfo[bEntranceZ]) || PlayerToPoint(3, playerid,BizzInfo[bExitX], BizzInfo[bExitY], BizzInfo[bExitZ])) { if(PlayerInfo[playerid][pPbiskey] == i) { if(BizzInfo[bLocked] == 1) { BizzInfo[bLocked] = 0; GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } if(BizzInfo[bLocked] == 0) { BizzInfo[bLocked] = 1; GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } } else { GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6); return 1; } } } for(new i = 0; i < sizeof(SBizzInfo); i++) { if (PlayerToPoint(3, playerid,SBizzInfo[sbEntranceX], SBizzInfo[sbEntranceY], SBizzInfo[sbEntranceZ])) { if(PlayerInfo[playerid][pPbiskey] == i+100) { if(SBizzInfo[sbLocked] == 1) { SBizzInfo[sbLocked] = 0; GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } if(SBizzInfo[sbLocked] == 0) { SBizzInfo[sbLocked] = 1; GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } } else { GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6); return 1; } } } } return 1; }[/pawn]
  8. Am rezolvat era dinstru fs ...
  9. Uni playeri primesc la inregistrare 15kk alti 100k cum fac sa primeasca toti la fel?
  10. error 052: multi-dimensional arrays must be fully initialized [pawn]new JoinPed[94][1] = { {280},//POLICE_FORCE {281}, {282}, {283}, {284}, {285}, {288}, {265},//71 {266},//166 {267},//295 {148}, {286},//FBI/ATF {164}, {163}, {287},//NATIONAL_GUARD {285}, {70},//FIRE/AMBULANCE {274}, {275}, {276}, {277}, {278}, {279}, {124},//The Mafia {125}, {126}, {112}, //113 {193}, {223}, {111}, {120},//The triads {117}, {118}, {122}, {123}, {169}, {186}, {127},//HITMANS {165}, {186}, {93}, {141}, {148},//NEWS_REPORTERS {188}, {187}, {255},//TAXI_CAB_COMPANY {61},//era 253 {59},//DRIVING/FLYING_SCHOOL {60},//DRIVING/FLYING_SCHOOL {76},//DRIVING/FLYING_SCHOOL {150},//DRIVING/FLYING_SCHOOL {100},//The Bikers {247}, {248}, {254}, {173},//San Fiero Riffa {174}, {175}, {121},//CIVILS {122}, {123}, {108},//Los Santos Vagos {109}, {110}, {30}, {47}, {211}, {114},//Varios Los Aztecas {115}, {116}, {173}, {174}, {175}, {55}, {102},//The Ballas {103}, {104}, {293},//21 {296},//28 {13}, {185}, {105},//Grove street {106}, {107}, {269}, {270}, {195}, {271}, {124},//Tattaglia {126}, {125}, {216}, {273} };[/pawn]
  11. Pai bag o masian pe server din gm dar aceasta este incuiata dece?
×
×
  • 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.