Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- //----------------------PERSONAL CAR SYSTEM FOR GODFATHER-----------------------
- //=================================by SoundLike ================================
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- //////////////////////////////////Clock And Date TD/////////////////////////////
- //===========================Section: Includes==================================
- #include <a_samp>
- #include <utils>
- #include <JunkBuster>
- #include <vehicle_library>
- //===========================Section: Definations===============================
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD3 0xCBCCCEFF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define COLOR_GRAD5 0xE3E3E3FF
- #define COLOR_GRAD6 0xF0F0F0FF
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_YELLOW2 0xF5DEB3AA
- #define COLOR_BLUE 0x2641FEAA
- #pragma tabsize 0
- //===========================Section: Forwards==================================
- forward split(const strsrc[], strdest[][], delimiter);
- forward LoadCar();
- forward SaveCarCoords();
- forward OnPropUpdate();
- forward IsAnOwnableCar(vehicleid);
- forward CarKeys(playerid);
- forward SavePlayerData(playerid);
- forward ini_GetKey( line[] );
- forward ini_GetValue( line[] );
- forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
- new carsonserver = 301;
- new vehName[][] = {
- "Landstalker",
- "Bravura",
- "Buffalo",
- "Linerunner",
- "Perrenial",
- "Sentinel",
- "Dumper",
- "Firetruck",
- "Trashmaster",
- "Stretch",
- "Manana",
- "Infernus",
- "Voodoo",
- "Pony",
- "Mule",
- "Cheetah",
- "Ambulance",
- "Leviathan",
- "Moonbeam",
- "Esperanto",
- "Taxi",
- "Washington",
- "Bobcat",
- "Whoopee",
- "BF Injection",
- "Hunter",
- "Premier",
- "Enforcer",
- "Securicar",
- "Banshee",
- "Predator",
- "Bus",
- "Rhino",
- "Barracks",
- "Hotknife",
- "Trailer",
- "Previon",
- "Coach",
- "Cabbie",
- "Stallion",
- "Rumpo",
- "RC Bandit",
- "Romero",
- "Packer",
- "Monster",
- "Admiral",
- "Squalo",
- "Seasparrow",
- "Pizzaboy",
- "Tram",
- "Trailer",
- "Turismo",
- "Speeder",
- "Reefer",
- "Tropic",
- "Flatbed",
- "Yankee",
- "Caddy",
- "Solair",
- "Berkley's RC Van",
- "Skimmer",
- "PCJ-600",
- "Faggio",
- "Freeway",
- "RC Baron",
- "RC Raider",
- "Glendale",
- "Oceanic",
- "Sanchez",
- "Sparrow",
- "Patriot",
- "ATV",
- "Coastguard",
- "Dinghy",
- "Hermes",
- "Sabre",
- "Rustler",
- "ZR-350",
- "Walton",
- "Regina",
- "Comet",
- "BMX",
- "Burrito",
- "Camper",
- "Marquis",
- "Baggage",
- "Dozer",
- "Maverick",
- "News Chopper",
- "Rancher",
- "FBI Rancher",
- "Virgo",
- "Greenwood",
- "Jetmax",
- "Hotring",
- "Sandking",
- "Blista Compact",
- "Police Maverick",
- "Boxvillde",
- "Benson",
- "Mesa",
- "RC Goblin",
- "Hotring Racer A",
- "Hotring Racer B",
- "Bloodring Banger",
- "Rancher",
- "Super GT",
- "Elegant",
- "Journey",
- "Bike",
- "Mountain Bike",
- "Beagle",
- "Cropduster",
- "Stunt",
- "Tanker",
- "Roadtrain",
- "Nebula",
- "Majestic",
- "Buccaneer",
- "Shamal",
- "Hydra",
- "FCR-900",
- "NRG-500",
- "HPV1000",
- "Cement Truck",
- "Tow Truck",
- "Fortune",
- "Cadrona",
- "FBI Truck",
- "Willard",
- "Forklift",
- "Tractor",
- "Combine",
- "Feltzer",
- "Remington",
- "Slamvan",
- "Blade",
- "Freight",
- "Streak",
- "Vortex",
- "Vincent",
- "Bullet",
- "Clover",
- "Sadler",
- "Firetruck",
- "Hustler",
- "Intruder",
- "Primo",
- "Cargobob",
- "Tampa",
- "Sunrise",
- "Merit",
- "Utility",
- "Nevada",
- "Jeep",
- "Windsor",
- "Monster",
- "Monster",
- "Uranus",
- "Jester",
- "Sultan",
- "Stratum",
- "Elegy",
- "Raindance",
- "RC Tiger",
- "Flash",
- "Tahoma",
- "Savanna",
- "Bandito",
- "Freight Flat",
- "Streak Carriage",
- "Kart",
- "Mower",
- "Dune",
- "Sweeper",
- "Broadway",
- "Tornado",
- "AT-400",
- "DFT-30",
- "Huntley",
- "Stafford",
- "BF-400",
- "News Van",
- "Tug",
- "Trailer",
- "Emperor",
- "Wayfarer",
- "Euros",
- "Hotdog",
- "Club",
- "Freight Box",
- "Trailer",
- "Andromada",
- "Dodo",
- "RC Cam",
- "Launch",
- "Police Car LSPD",
- "Police Car SFPD",
- "Police Car LVPD",
- "Police Ranger",
- "Picador",
- "S.W.A.T",
- "Alpha",
- "Phoenix",
- "Glendale",
- "Sadler",
- "Luggage",
- "Luggage",
- "Stairs",
- "Boxville",
- "Tiller",
- "Utility Trailer"
- };
- //===========================Section: Variables=================================
- enum pInfo
- {
- pPcarkey,
- pPcarkey2,
- }
- new PlayerInfo[256][pInfo];
- enum cInfo
- {
- cModel,
- Float:cLocationx,
- Float:cLocationy,
- Float:cLocationz,
- Float:cAngle,
- cColorOne,
- cColorTwo,
- cOwner[MAX_PLAYER_NAME],
- cDescription[12],
- cOwned,
- cLock,
- };
- new CarInfo[650][cInfo];
- //===========================Section: strtok & split============================
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- public split(const strsrc[], strdest[][], delimiter)
- {
- new i, li;
- new aNum;
- new len;
- while(i <= strlen(strsrc)){
- if(strsrc[i]==delimiter || i==strlen(strsrc)){
- len = strmid(strdest[aNum], strsrc, li, i, 128);
- strdest[aNum][len] = 0;
- li = i+1;
- aNum++;
- }
- i++;
- }
- return 1;
- }
- //===========================Section: Callbacks & Functions=====================
- public OnFilterScriptInit()
- {
- LoadCar();
- for(new h = carsonserver; h < sizeof(CarInfo); h++)
- {
- AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
- }
- return 1;
- }
- public OnFilterScriptExit()
- { return 1; }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- new carid = GetPlayerVehicleID(playerid);
- if ((newkeys & KEY_SECONDARY_ATTACK))
- {
- if(IsAnOwnableCar(carid) && CarInfo[carid][cOwned] == 0)
- {
- TogglePlayerControllable(playerid, 1);
- RemovePlayerFromVehicle(playerid);
- }
- }
- }
- public SavePlayerData(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- new string3[32];
- new playername3[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername3, sizeof(playername3));
- format(string3, sizeof(string3), "carkeys/%s.ini", playername3);
- new File: hFile = fopen(string3, io_write);
- if (hFile)
- {
- new var[32];
- format(var, 32, "CarKey=%d\n",PlayerInfo[playerid][pPcarkey]);fwrite(hFile, var);
- format(var, 32, "CarKey2=%d\n",PlayerInfo[playerid][pPcarkey2]);fwrite(hFile, var);
- fclose(hFile);
- }
- }
- return 1;
- }
- public CarKeys(playerid)
- {
- new string2[64];
- new playername2[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername2, sizeof(playername2));
- format(string2, sizeof(string2), "carkeys/%s.ini", playername2);
- new File: UserFile = fopen(string2, io_read);
- if ( UserFile )
- {
- new key[ 256 ] , val[ 256 ];
- new Data[ 256 ];
- while ( fread( UserFile , Data , sizeof( Data ) ) )
- {
- key = ini_GetKey( Data );
- if( strcmp( key , "CarKey" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPcarkey] = strval( val ); }
- if( strcmp( key , "CarKey2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPcarkey2] = strval( val ); }
- }
- fclose(UserFile);
- }
- return 1;
- }
- public OnPropUpdate()
- {
- new idx;
- new File: file2;
- idx = carsonserver;
- while (idx < sizeof(CarInfo))
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%d,%f,%f,%f,%f,%d,%d,%s,%s,%d,%d\n",
- CarInfo[idx][cModel],
- CarInfo[idx][cLocationx],
- CarInfo[idx][cLocationy],
- CarInfo[idx][cLocationz],
- CarInfo[idx][cAngle],
- CarInfo[idx][cColorOne],
- CarInfo[idx][cColorTwo],
- CarInfo[idx][cOwner],
- CarInfo[idx][cDescription],
- CarInfo[idx][cOwned],
- CarInfo[idx][cLock]);
- if(idx == carsonserver)
- {
- file2 = fopen("pcars.cfg", io_write);
- }
- else
- {
- file2 = fopen("pcars.cfg", io_append);
- }
- fwrite(file2, coordsstring);
- idx++;
- fclose(file2);
- }
- return 1;
- }
- public IsAnOwnableCar(vehicleid)
- {
- if(vehicleid >= carsonserver && vehicleid <= 650) { return 1; }
- return 0;
- }
- //---------------------------<[ OnDialogResponse ]>--------------------------------------------------------
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new string[256];
- new sendername[MAX_PLAYER_NAME];
- new giveplayerid;
- new idcar = GetPlayerVehicleID(playerid);
- if(dialogid==1234)
- {
- if(response)
- {
- if(strmatch("xEnOx", PlayerName(playerid))|| strmatch("xEnOn", PlayerName(playerid)))
- {
- if(IsPlayerInVehicle(playerid,idcar))
- {
- if(IsAnOwnableCar(idcar))
- {
- if(strlen(inputtext))
- {
- giveplayerid = ReturnUser(inputtext);
- if(PlayerInfo[giveplayerid][pPcarkey] == -1) { }
- else if(PlayerInfo[giveplayerid][pPcarkey2] == -1) { }
- else { SendClientMessage(playerid, COLOR_GREY, " That player allready have 2 cars"); return 1; }
- if(CarInfo[idcar][cOwned]==1)
- {
- SendClientMessage(playerid, COLOR_GREY, "Someone already owns this car");
- return 1;
- }
- if(PlayerInfo[giveplayerid][pPcarkey] == -1) { PlayerInfo[giveplayerid][pPcarkey] = idcar; }
- else if(PlayerInfo[giveplayerid][pPcarkey2] == -1) { PlayerInfo[giveplayerid][pPcarkey2] = idcar; }
- else { return 1; }
- CarInfo[idcar][cOwned] = 1;
- GetPlayerName(giveplayerid, sendername, sizeof(sendername));
- strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999);
- SavePlayerData(giveplayerid);
- OnPropUpdate();
- format(string,128, " Personal car set to %s",sendername);
- SendClientMessage(playerid, COLOR_GREEN, string);
- RemovePlayerFromVehicle(playerid);
- }
- }
- else SendClientMessage(playerid, COLOR_GREY, " ERROR. That car is not a ownable car");
- }
- else SendClientMessage(playerid, COLOR_GREY, " You must be in ownable vehicle to set a personal car");
- }
- else SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use that command");
- }
- }
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(IsAnOwnableCar(vehicleid) && CarInfo[vehicleid][cLock] == 1 && CarInfo[vehicleid][cOwned] == 1)
- {
- if(strmatch("xEnOx", PlayerName(playerid))|| strmatch("xEnOn", PlayerName(playerid))) { }
- else
- {
- new Float:cx, Float:cy, Float:cz;
- GetPlayerPos(playerid, cx, cy, cz);
- SetPlayerPos(playerid, cx, cy, cz);
- }
- }
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- CarKeys(playerid);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- PlayerInfo[playerid][pPcarkey] = -1;
- PlayerInfo[playerid][pPcarkey2] = -1;
- for(new h = carsonserver; h < sizeof(CarInfo); h++)
- {
- SetVehicleParamsForPlayer(h,playerid,0,CarInfo[h][cLock]);
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new idx;
- new string[256];
- new cmd[256];
- new tmp[256];
- new playername[MAX_PLAYER_NAME];
- new idcar = GetPlayerVehicleID(playerid);
- new sendername[MAX_PLAYER_NAME];
- new giveplayerid;
- cmd = strtok(cmdtext, idx);
- new vehid;
- vehid = GetPlayerVehicleID(playerid);
- if(strcmp(cmd, "/chelp", true) == 0)
- {
- if(strmatch("xEnOx", PlayerName(playerid))|| strmatch("xEnOn", PlayerName(playerid)))
- {
- SendClientMessage(playerid, COLOR_GRAD1, " ** Personal Cars Comands ** - /apark /upgradecars /asetkey /asetowner /acreatecar /adeletecar /checkcars ");
- }
- }
- if(strcmp(cmd, "/apark", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:x,Float:y,Float:z;
- new Float:a;
- new carid;
- carid = GetPlayerVehicleID(playerid);
- GetPlayerName(playerid, playername, sizeof(playername));
- GetVehiclePos(carid, x, y, z);
- GetVehicleZAngle(carid, a);
- if(strmatch("xEnOx", PlayerName(playerid))|| strmatch("xEnOn", PlayerName(playerid)))
- {
- CarInfo[carid][cLocationx] = x;
- CarInfo[carid][cLocationy] = y;
- CarInfo[carid][cLocationz] = z;
- CarInfo[carid][cAngle] = a;
- format(string, sizeof(string), "New position saved ( by admin %s)", playername);
- OnPropUpdate(); SavePlayerData(playerid);
- DestroyVehicle(carid);
- new thatcar = CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],999999);
- PutPlayerInVehicle(playerid,thatcar,0);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use that command !");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/asetowner",true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /asetowner [playerid/PartOfName]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(strmatch("xEnOx", PlayerName(playerid))|| strmatch("xEnOn", PlayerName(playerid)))
- {
- if(IsPlayerInVehicle(playerid, idcar) && IsAnOwnableCar(idcar))
- {
- if(PlayerInfo[giveplayerid][pPcarkey] == -1) { }
- else if(PlayerInfo[giveplayerid][pPcarkey2] == -1) { }
- else { SendClientMessage(playerid, COLOR_GREY, " That player allready have 2 cars"); return 1; }
- if(PlayerInfo[giveplayerid][pPcarkey] == -1) { PlayerInfo[giveplayerid][pPcarkey] = idcar; }
- else if(PlayerInfo[giveplayerid][pPcarkey2] == -1) { PlayerInfo[giveplayerid][pPcarkey2] = idcar; }
- else { return 1; }
- if(CarInfo[idcar][cOwned] == 0)
- {
- CarInfo[idcar][cOwned] = 1;
- }
- GetPlayerName(giveplayerid, sendername, sizeof(sendername));
- format(string, 128, " Masina lui %s i-a fost data lui %s ", CarInfo[idcar][cOwner], sendername);
- SendClientMessage(playerid,COLOR_GREEN, string);
- strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999);
- SavePlayerData(giveplayerid);
- OnPropUpdate();
- RemovePlayerFromVehicle(playerid);
- }
- else SendClientMessage(playerid, COLOR_GRAD1, " You must be in the personal car");
- }
- }
- }
- if(strcmp(cmd, "/checkcars",true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /checkcars [playerid/PartOfName]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(strmatch("xEnOx", PlayerName(playerid))|| strmatch("xEnOn", PlayerName(playerid)))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- new carkey = PlayerInfo[giveplayerid][pPcarkey];
- new carkey2 = PlayerInfo[giveplayerid][pPcarkey2];
- GetPlayerName(giveplayerid,sendername,38);
- if (PlayerInfo[giveplayerid][pPcarkey] != -1)
- {
- format(string, 128, " *** [%s 's vehicle stats] ***",sendername);
- SendClientMessage(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "{00C8FF}Slot:[1] ** VehModel:[%s] ** VehCol1:[%d] ** VehCol2:[%d] ** OldVehID[%d]", CarInfo[carkey][cDescription], CarInfo[carkey][cColorOne], CarInfo[carkey][cColorTwo], CarInfo[carkey][cLock],PlayerInfo[giveplayerid][pPcarkey]);
- SendClientMessage(playerid, COLOR_GRAD5,string);
- }
- if (PlayerInfo[playerid][pPcarkey2] != -1)
- {
- format(string, sizeof(string), "{007BFF}Slot:[2] ** VehModel:[%s] ** VehCol1:[%d] ** VehCol2:[%d] ** OldVehID[%d]", CarInfo[carkey2][cDescription], CarInfo[carkey2][cColorOne], CarInfo[carkey2][cColorTwo], CarInfo[carkey2][cLock],PlayerInfo[giveplayerid][pPcarkey2]);
- SendClientMessage(playerid, COLOR_GRAD5,string);
- }
- if(PlayerInfo[giveplayerid][pPcarkey] == -1 && PlayerInfo[giveplayerid][pPcarkey2] == -1)
- {
- SendClientMessage(playerid,COLOR_GRAD5, " That player haven't a personal vehicle");
- }
- }
- else SendClientMessage(playerid,COLOR_GRAD1, " Wrong player ID");
- }
- else SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that commad");
- }
- }
- /* if(strcmp(cmd,"/upgradecars",true) == 0)
- {
- if(strmatch("xEnOn", PlayerName(playerid))|| strmatch("xEnOn", PlayerName(playerid)))
- {
- for(new i=carsonserver; i<sizeof(CarInfo); i++)
- {
- DestroyVehicle(i);
- }
- LoadCar();
- for(new h = carsonserver; h < sizeof(CarInfo); h++)
- {
- AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
- }
- SendClientMessageToAll(-1," {DB3737}* {AEFF00}All personal cars has been updated! .");
- }
- else SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that commad");
- }*/
- if(strcmp(cmd, "/asetkey", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /asetkey [playerid/PartOfName] [carkey] [amount]");
- SendClientMessage(playerid, COLOR_GRAD4, "|1 CarKey |2 CarKey2 |3 CarKey3");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(strmatch("xEnOn", PlayerName(playerid))|| strmatch("xEnOn", PlayerName(playerid)))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /asetkey [playerid/PartOfName] [carkey] [amount]");
- SendClientMessage(playerid, COLOR_GRAD4, "|1 CarKey |2 CarKey2 |3 CarKey3");
- return 1;
- }
- new stat;
- stat = strval(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /asetkey [playerid/PartOfName] [carkey] [amount]");
- SendClientMessage(playerid, COLOR_GRAD4, "|1 CarKey |2 CarKey2 |3 CarKey3");
- return 1;
- }
- new amount;
- amount = strval(tmp);
- switch (stat)
- {
- case 1:
- {
- PlayerInfo[giveplayerid][pPcarkey] = amount;
- format(string, sizeof(string), " The Player Car Key Was Set To %d", amount);
- SavePlayerData(playerid);
- }
- case 2:
- {
- PlayerInfo[giveplayerid][pPcarkey2] = amount;
- format(string, sizeof(string), " The Player Car Key 2 Was Set To %d", amount);
- SavePlayerData(playerid);
- }
- default:
- {
- format(string, sizeof(string), " Invalid Car Key Code", amount);
- }
- }
- SendClientMessage(playerid, COLOR_GRAD1, string);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Doar adminii pot folosi aceasta comanda!");
- return 1;
- }
- }
- return 1;
- }
- /*if(strcmp(cmd, "/adeletecar", true) == 0)
- {
- if(strmatch("xEnOn", PlayerName(playerid))|| strmatch("xEnOn", PlayerName(playerid)))
- {
- CarInfo[idcar][cOwned] = 0; CarInfo[idcar][cModel] = 0; CarInfo[idcar][cColorOne] = 0; CarInfo[idcar][cColorTwo] = 0;
- CarInfo[idcar][cLocationx] = 0; CarInfo[idcar][cLocationy] = 0; CarInfo[idcar][cLocationz] = 0; CarInfo[idcar][cAngle] = 0;
- CarInfo[idcar][cLock] = 0;
- strmid(CarInfo[idcar][cOwner], "No-one", 0, strlen("No-one"), 999);
- format(CarInfo[idcar][cDescription], 32, "0");
- DestroyVehicle(idcar);
- OnPropUpdate(); SavePlayerData(playerid);
- }
- }*/
- if(strcmp(cmd, "/acreatecar", true) == 0)
- {
- if(strmatch("xEnOn", PlayerName(playerid))|| strmatch("xEnOn", PlayerName(playerid)))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /acreatecar [carid] [culoare1] [culoare2]");
- return 1;
- }
- new car;
- car = strval(tmp);
- if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_WHITE, " Vehicle Number can't be below 400 or above 611 !"); return 1; }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /acreatecar [carid] [culoare1] [culoare2]");
- return 1;
- }
- new color1;
- color1 = strval(tmp);
- if(color1 < 0 || color1 > 252) { SendClientMessage(playerid, COLOR_WHITE, " Color Number can't be below 0 or above 252 !"); return 1; }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /acreatecar [carid] [culoare1] [culoare2]");
- return 1;
- }
- new color2;
- color2 = strval(tmp);
- if(color2 < 0 || color2 > 252) { SendClientMessage(playerid, COLOR_WHITE, " Color Number can't be below 0 or above 252 !"); return 1; }
- new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z);
- new thiscar = CreateVehicle(car,X,Y,Z,1,color1,color2,99999999);
- CarInfo[thiscar][cOwned] = 0; CarInfo[thiscar][cModel] = car; CarInfo[thiscar][cColorOne] = color1; CarInfo[thiscar][cColorTwo] = color2;
- CarInfo[thiscar][cLocationx] = X; CarInfo[thiscar][cLocationy] = Y; CarInfo[thiscar][cLocationz] = Z; CarInfo[thiscar][cAngle] = 1;
- CarInfo[thiscar][cLock] = 0;
- PutPlayerInVehicle(playerid,thiscar,0);
- strmid(CarInfo[vehid][cOwner], "No-one", 0, strlen("No-one"), 999);
- format(CarInfo[thiscar][cDescription], 32, "%s",vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
- format(string, sizeof(string), "The car %s [%d] has been created",CarInfo[thiscar][cDescription],thiscar);
- SendClientMessage(playerid, COLOR_BLUE, string);
- ShowPlayerDialog(playerid,1234,DIALOG_STYLE_INPUT,"{E0941B}Vehicle owner","Write playerid/PartOfName \nto make owner this car:","Enter","Close");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
- return 1;
- }
- }
- 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," ___________[Personal vehicle comands]__________");
- SendClientMessage(playerid, COLOR_WHITE, " ** {7ED43D}(/v)ehicle {3DBBD4}[name]");
- SendClientMessage(playerid, COLOR_WHITE, " ** save, model, color, lock(1-2), tow(1-2), fix(1-2), list");
- return 1;
- }
- else if(strcmp(x_nr,"list",true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new carkey = PlayerInfo[playerid][pPcarkey];
- new carkey2 = PlayerInfo[playerid][pPcarkey2];
- if (PlayerInfo[playerid][pPcarkey] != -1)
- {
- format(string, sizeof(string), "1| VehModel:[%s] VehColor1:[%d] VehColor2:[%d] VehLocked:[%d] VehOldID[%d]", CarInfo[carkey][cDescription], CarInfo[carkey][cColorOne], CarInfo[carkey][cColorTwo], CarInfo[carkey][cLock], carkey);
- SendClientMessage(playerid, COLOR_GRAD5,string);
- }
- if (PlayerInfo[playerid][pPcarkey2] != -1)
- {
- format(string, sizeof(string), "2| VehModel:[%s] VehColor1:[%d] VehColor2:[%d] VehLocked:[%d] VehOldID[%d]", CarInfo[carkey2][cDescription], CarInfo[carkey2][cColorOne], CarInfo[carkey2][cColorTwo], CarInfo[carkey2][cLock], carkey2);
- SendClientMessage(playerid, COLOR_GRAD5,string);
- }
- }
- }
- else if(strcmp(x_nr,"model",true) == 0)
- {
- 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 { return 1; }
- getcarid = GetPlayerVehicleID(playerid);
- GetPlayerName(playerid, playername, sizeof(playername));
- if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)
- {
- if(PlayerInfo[playerid][pPcarkey] == -1 && PlayerInfo[playerid][pPcarkey2] == -1)
- {
- SendClientMessage(playerid, COLOR_GREY, " You don't have a personal car.");
- return 1;
- }
- if(getcarid == carid)
- {
- if(PlayerInfo[playerid][pPcarkey] != -1 && PlayerInfo[playerid][pPcarkey2] != -1)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v model [vehicleid]");
- return 1;
- }
- new model;
- model = strval(tmp);
- if(model < 400 && model > 611)
- {
- SendClientMessage(playerid, COLOR_GREY, " Wrong model id!");
- return 1;
- }
- CarInfo[carid][cModel] = model;
- format(CarInfo[carid][cDescription], 32, "%s",vehName[model-400]);
- format(string, sizeof(string), " [Veh Info]: {3D9AD4}New vehicle model saved.");
- SendClientMessage(playerid, COLOR_YELLOW, string);
- OnPropUpdate(); SavePlayerData(playerid);
- DestroyVehicle(carid);
- new thatcar = CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],999999);
- PutPlayerInVehicle(playerid,thatcar,0);
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- else SendClientMessage(playerid, COLOR_GREY, " ");
- }
- }
- else SendClientMessage(playerid, COLOR_GREY, " You are not in personal car");
- }
- else if(strcmp(x_nr,"save",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 { 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)
- {
- SendClientMessage(playerid, COLOR_GREY, " You don't have a personal 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), " [Veh Info]: {3D9AD4}New position saved.");
- SendClientMessage(playerid, COLOR_YELLOW, string);
- OnPropUpdate(); SavePlayerData(playerid);
- DestroyVehicle(carid);
- new thatcar = CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],999999);
- PutPlayerInVehicle(playerid,thatcar,0);
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- }
- else SendClientMessage(playerid, COLOR_GREY, " You are not in personal car");
- }
- 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), " [Veh Info]: {3BE8FF}Vehicle {08FC00}Unlocked");
- SendClientMessage(playerid, COLOR_YELLOW, string);
- 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), " [Veh Info]: {3BE8FF}Vehicle {FC0000}Locked");
- SendClientMessage(playerid, COLOR_YELLOW, string);
- 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), " [Veh Info]: {3BE8FF}Vehicle {08FC00}Unlocked");
- SendClientMessage(playerid, COLOR_YELLOW, string);
- 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), " [Veh Info]: {3BE8FF}Vehicle {FC0000}Locked");
- SendClientMessage(playerid, COLOR_YELLOW, string);
- 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,"color",true) == 0)
- {
- if(PlayerInfo[playerid][pPcarkey] == -1 && PlayerInfo[playerid][pPcarkey2] == -1)
- {
- SendClientMessage(playerid, COLOR_GREY," You don't have a vehicle to 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 > 252)
- {
- 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 > 252)
- {
- 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 { return 1; }
- if(IsPlayerInVehicle(playerid, vehid))
- {
- new carid;
- CarInfo[vehid][cColorOne] = color1;
- CarInfo[vehid][cColorTwo] = color2;
- format(string, sizeof(string), " [Veh Info]: {3BE8FF}Vehicle color: Color1- %d , Color2- %d", color1,color2);
- SendClientMessage(playerid,COLOR_YELLOW,string);
- OnPropUpdate(); SavePlayerData(playerid);
- DestroyVehicle(carid);
- new thatcar = CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],999999);
- PutPlayerInVehicle(playerid,thatcar,0);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY," You are not in your vehicle.");
- return 1;
- }
- }
- else if(strcmp(x_nr,"fix1",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)
- {
- format(string, sizeof(string), " [Veh Info]: {3BE8FF}Your vehicle %s was respawned", CarInfo[car][cDescription]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- SetVehicleToRespawn(car);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " You don't have a personal car");
- }
- }
- }
- else if(strcmp(x_nr,"fix2",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)
- {
- format(string, sizeof(string), " [Veh Info]: {3BE8FF}Your vehicle %s was respawned", CarInfo[car][cDescription]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- SetVehicleToRespawn(car);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " You don't have a personal car");
- }
- }
- }
- 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)
- {
- format(string, sizeof(string), " [Veh Info]: {3BE8FF}Your vehicle %s was towed", CarInfo[car][cDescription]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- SetVehiclePos(car,CarInfo[car][cLocationx],CarInfo[car][cLocationy],CarInfo[car][cLocationz]);
- SetVehicleZAngle(car, CarInfo[car][cAngle]);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " You don't have a personal car");
- }
- }
- }
- 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)
- {
- format(string, sizeof(string), " [Veh Info]: {3BE8FF}Your vehicle %s was towed", CarInfo[car][cDescription]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- SetVehiclePos(car,CarInfo[car][cLocationx],CarInfo[car][cLocationy],CarInfo[car][cLocationz]);
- SetVehicleZAngle(car, CarInfo[car][cAngle]);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " You don't have a personal car");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE," ___________[Personal vehicle comands]__________");
- SendClientMessage(playerid, COLOR_WHITE, " ** {7ED43D}(/v)ehicle {3DBBD4}[name]");
- SendClientMessage(playerid, COLOR_WHITE, " ** save, model, color, lock(1-2), tow(1-2), fix(1-2), list");
- return 1;
- }
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- /*----------Car Save Functions----------*/
- public LoadCar()
- {
- new arrCoords[31][64];
- new strFromFile2[256];
- new File: file = fopen("pcars.cfg", io_read);
- if (file)
- {
- new idx = carsonserver;
- while (idx < sizeof(CarInfo))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, ',');
- CarInfo[idx][cModel] = strval(arrCoords[0]);
- CarInfo[idx][cLocationx] = floatstr(arrCoords[1]);
- CarInfo[idx][cLocationy] = floatstr(arrCoords[2]);
- CarInfo[idx][cLocationz] = floatstr(arrCoords[3]);
- CarInfo[idx][cAngle] = floatstr(arrCoords[4]);
- CarInfo[idx][cColorOne] = strval(arrCoords[5]);
- CarInfo[idx][cColorTwo] = strval(arrCoords[6]);
- strmid(CarInfo[idx][cOwner], arrCoords[7], 0, strlen(arrCoords[7]), 255);
- strmid(CarInfo[idx][cDescription], arrCoords[8], 0, strlen(arrCoords[8]), 255);
- CarInfo[idx][cOwned] = strval(arrCoords[9]);
- CarInfo[idx][cLock] = strval(arrCoords[10]);
- printf("CarInfo: %d Owner:%s Discription: %s",idx,CarInfo[idx][cOwner],CarInfo[idx][cDescription]);
- idx++;
- }
- }
- return 1;
- }
- public SaveCarCoords()
- {
- new idx;
- new File: file2;
- while (idx < sizeof(CarInfo))
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%d|%f|%f|%f|%f|%d|%d\n",
- CarInfo[idx][cModel],
- CarInfo[idx][cLocationx],
- CarInfo[idx][cLocationy],
- CarInfo[idx][cLocationz],
- CarInfo[idx][cAngle],
- CarInfo[idx][cColorOne],
- CarInfo[idx][cColorTwo]);
- if(idx == carsonserver)
- {
- file2 = fopen("pcars.cfg", io_write);
- }
- else
- {
- file2 = fopen("pcars.cfg", io_append);
- }
- fwrite(file2, coordsstring);
- idx++;
- fclose(file2);
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new string[128];
- new vehicle = GetPlayerVehicleID(playerid);
- new newcar = GetPlayerVehicleID(playerid);
- new name[MAX_PLAYER_NAME], Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- GetPlayerName(playerid,name,sizeof(name));
- if(newstate == PLAYER_STATE_DRIVER)
- {
- if(IsAnOwnableCar(newcar))
- {
- if(CarInfo[newcar][cOwned]==1)
- {
- if(strcmp(name,CarInfo[newcar][cOwner], true) == 0)
- {
- format(string,sizeof(string)," * Vehiculul tau, %s",CarInfo[newcar][cOwner]);
- SendClientMessage(playerid, COLOR_BLUE, string);
- if(PlayerInfo[playerid][pPcarkey] == vehicle) { }
- else if(PlayerInfo[playerid][pPcarkey2] == vehicle) { }
- }
- else
- {
- if(strmatch("xEnOn", PlayerName(playerid))|| strmatch("xEnOn", PlayerName(playerid)))
- {
- SendClientMessage(playerid, COLOR_GREY, " You can drive this car because you are xEnOx");
- }
- else
- {
- SetPlayerPos(playerid,x,y,z+2);
- }
- format(string, sizeof(string), " * Aceast vehicul apartine lui: %s",CarInfo[newcar][cOwner]);
- SendClientMessage(playerid, COLOR_GREY, string);
- }
- }
- }
- }
- return 1;
- }
- stock ini_GetKey( line[] )
- {
- new keyRes[256];
- keyRes[0] = 0;
- if ( strfind( line , "=" , true ) == -1 ) return keyRes;
- strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
- return keyRes;
- }
- stock ini_GetValue( line[] )
- {
- new valRes[256];
- valRes[0]=0;
- if ( strfind( line , "=" , true ) == -1 ) return valRes;
- strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
- return valRes;
- }
- stock strmatch(const String1[], const String2[])
- {
- if((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1)))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- stock PlayerName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
Advertisement
Add Comment
Please, Sign In to add comment