#include #include #include #include #include // for the samp stuff #include // for the functions dini and dudb need #include #include // for the userdatabase, get dudb version 2.0 for this. #define dcmd(%1,%2,%3) if ((strcmp(%3, "/%1", true, %2+1) == 0)&&(((%3[%2+1]==0)&&(dcmd_%1(playerid,"")))||((%3[%2+1]==32)&&(dcmd_%1(playerid,%3[%2+2]))))) return 1 new playerCheckpoint[MAX_PLAYERS]; //colors ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- #define COLOR_SYSTEM 0x778899AA #define COLOR_GREEN 0xADFF2FAA #define COLOR_RED 0x8B0000AA #define COLOR_ORANGE 0xFF8C00AA #define COLOR_YELLOW 0xFFD700AA #define COLOR_WHITE 0x778899AA #define COLOR_GREY 0x778899AA #define YELLOW 0xFFD700AA // pt proprietati ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- #define CP_BANK 0 #define CP_PIRATE 1 #define CP_AMMU 2 #define CP_DRAGON 3 #define CP_SEXSHOP 4 #define CP_BAR 5 #define CP_CALIGULA 6 #define CP_ZIP 7 #define CP_BINCO 8 #define CP_TATOO 9 #define CP_BOTIQUE 10 #define P_DRAGON 0 #define P_SEXSHOP 1 #define P_BAR 2 #define P_CALIGULA 3 #define P_ZIP 4 #define P_BINCO 5 #define P_TATOO 6 #define P_BOTIQUE 7 #define P_OFFSET 3 #define MAX_POINTS 11 new Float:checkCoords[MAX_POINTS][4] = { {-36.5483,-57.9948, -17.2655,-49.2967}, //BANK {1894.6128,1445.3431, 2084.9739,1637.8186}, //PIRATE {284.0546,-86.4384, 302.9315,-56.6674}, //AMMUNATION {1925.1511,968.2358, 2019.0715,1067.4276}, //DRAGON {-115.9544,-24.2706, -99.1631,-7.1391}, //SEXSHOP {487.6558,-88.5900, 512.0635, -67.7503}, //BAR {2216.7971,1638.0493, 2255.2097,1714.0806}, //CALIGULA {144.9131,-96.0927, 177.4128,-70.7923}, //ZIP {201.4462,-112.4556, 218.5237,-95.1238}, //BINCO {-204.7623,-44.0326, -200.2330,-39.8128}, //TATOO {416.7485,-84.4242, 422.6890,-74.0611} //BOTIQUE }; new Float:checkpoints[MAX_POINTS][3] = { {-22.2549,-55.6575,1003.5469}, {2000.3132,1538.6012,13.5859}, {291.0004,-84.5168,1001.5156}, {1989.0619,1005.5241,994.4688}, {-103.5525,-22.4661,1000.7188}, {501.4927,-75.4323,998.7578}, {2235.5408,1679.0402,1008.3594}, {161.1875,-79.9915,1001.8047}, {207.5640,-97.8188,1005.2578}, {-203.4864,-41.2045,1002.2734}, {418.5547,-80.1667,1001.8047} }; new checkpointType[MAX_POINTS] = { CP_BANK, CP_PIRATE, CP_AMMU, CP_DRAGON, CP_SEXSHOP, CP_BAR, CP_CALIGULA, CP_ZIP, CP_BINCO, CP_TATOO, CP_BOTIQUE }; #define MAX_PROPERTIES 8 new propertyNames[MAX_PROPERTIES][32] = { "Four Dragons", "Sex Shop", "Shithole Bar", "Caligula", "Zip Shop", "Binco Shop", "Tatoo Parlor", "Botique" }; new propertyValues[MAX_PROPERTIES] = { 75000, 25000, 20000, 100000, 15000, 15000, 10000, 20000 }; new propertyEarnings[MAX_PROPERTIES] = { 5000, 2000, 1500, 7000, 1000, 1000, 700, 1500 }; new propertyOwner[MAX_PROPERTIES] = {999,999,999,999,999,999,999,999}; new ownedcar[MAX_PLAYERS]; new owner[MAX_PLAYERS]; main() { print("\n----------------------------------"); print(" Abys RPG Server Script"); print("----------------------------------\n"); } new PLAYERLIST_authed[MAX_PLAYERS]; public SystemMsg(playerid,msg[]) { if ((IsPlayerConnected(playerid))&&(strlen(msg)>0)) { SendClientMessage(playerid,COLOR_SYSTEM,msg); } return 1; } /* * This function will be useful when we need the playername * (c) by DracoBlue 2006 */ public PlayerName(playerid) { new name[255]; GetPlayerName(playerid, name, 255); return name; } public checkpointUpdate() { for(new i=0; i= data[0] && X <= data[2] && Y >= data[1] && Y <= data[3]) { return 1; } return 0; } public getCheckpointType(playerID) { return checkpointType[playerCheckpoint[playerID]]; } public PropertyScoreUpdate() { new owners[MAX_PROPERTIES]; new payments[MAX_PROPERTIES]; for(new i=0; i < MAX_PROPERTIES; i++) owners[i]=999; for(new i=0; i < MAX_PROPERTIES; i++) { if(propertyOwner[i] < 999) { for(new j=0; j < MAX_PROPERTIES; j++) { if(owners[j]==propertyOwner[i]) { payments[j]+=propertyEarnings[i]; j = MAX_PROPERTIES; } else if (owners[j]==999) { owners[j]=propertyOwner[i]; payments[j]+=propertyEarnings[i]; j = MAX_PROPERTIES; } } } } for(new i=0; i < MAX_PROPERTIES; i++) { if(owners[i] < 999 && IsPlayerConnected(owners[i])) { new string[256]; GivePlayerMoney(owners[i], payments[i]); format(string, sizeof(string), "You earned $%d from your properties.", payments[i]); SendClientMessage(owners[i], COLOR_GREEN, string); } } } public OnGameModeInit() { SetGameModeText("Blank Script"); //Class---------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- AddPlayerClass(0,1686.5153,-2239.4348,13.5469,184.3173,0,0,0,0,0,0); // //Abys cars---------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- AddStaticVehicle(545,1248.8104,-803.6592,83.9517,181.3483,0,0); // AddStaticVehicle(535,1243.2156,-803.9633,83.9036,179.1478,0,0); // AddStaticVehicle(482,1254.1844,-803.8928,84.2610,178.7456,0,0); // AddStaticVehicle(409,1249.0216,-783.7327,90.2538,359.7924,0,0); // AddStaticVehicle(487,1291.2119,-788.2175,96.6344,359.1870,0,0); // //other cars----------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- AddStaticVehicle(560,2487.5754,-1537.7789,23.6992,357.4797,21,1); // //necesar pt payday--------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- SetTimer("PayDay", 360000, 1); SetTimer("checkpointUpdate", 1100, 1); //SetTimer("PirateShipScoreUpdate", 2001, 1); SetTimer("PropertyScoreUpdate", 40005, 1); return 1; } public OnPlayerRequestClass(playerid, classid) { printf("OnPlayerRequestClass(%d, %d)", playerid, classid); SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); return 1; } public OnGameModeExit() { return 1; } public OnPlayerConnect(playerid) { PLAYERLIST_authed[playerid]=false; GameTextForPlayer(playerid, "Abys RPG Server", 5000, 1); SendClientMessage(playerid, COLOR_ORANGE, "Bun venit pe server , scrie /help pt ajutor"); SendClientMessage(playerid, COLOR_ORANGE, "INAINTE DE A JUCA INREGISTREAZATE"); SendClientMessage(playerid, COLOR_RED, "Scoate codurile marlane :))"); SendClientMessage(playerid, COLOR_WHITE, "Bafta pe server"); return false; } public OnPlayerDisconnect(playerid) { return false; } public OnPlayerSpawn(playerid) { //Spawnpoint for abys-------------------------------------------------------------------- new pname[24]; GetPlayerName(playerid, pname, 24); if(strcmp(pname, "abys", true) == 0) { SetPlayerPos(playerid,1298.2028,-800.5502,84.1406); SendClientMessage(playerid, COLOR_GREEN, "Welcome to your house 'abys' !"); SetWorldTime(0); GivePlayerMoney(playerid, 10000); } return 1; } public OnPlayerDeath(playerid, killerid, reason) { printf("OnPlayerDeath(%d, %d, %d)", playerid, killerid, reason); return 1; } public OnVehicleSpawn(vehicleid) { //abc return 1; } public OnVehicleDeath(vehicleid, killerid) { printf("OnVehicleDeath(%d, %d)", vehicleid, killerid); return 1; } public OnPlayerText(playerid) { printf("OnPlayerText(%d)", playerid); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { // commanda /help ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- if (strcmp(cmdtext, "/help", true)==0) { SendClientMessage(playerid, COLOR_YELLOW, "*****( WWW.x-games.TK)*****"); SendClientMessage(playerid, COLOR_YELLOW, "Nui prea greu , e un simplu server RPG"); SendClientMessage(playerid, COLOR_YELLOW, "Scrie /commands pentru a vedea commenzile"); SendClientMessage(playerid, COLOR_YELLOW, "Oblicatoriu dati /rules pentru a vedea regulile"); SendClientMessage(playerid, COLOR_YELLOW, "Inregitrativa inainte de a intra in jok"); SendClientMessage(playerid, COLOR_YELLOW, "Dute la punctu rosu de pe harta ca sa castigi bani"); } //commanda /commands ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- if (strcmp(cmdtext, "/commands", true)==0) { SendClientMessage(playerid, COLOR_YELLOW, "*****( WWW.x-games.TK)*****"); SendClientMessage(playerid, COLOR_YELLOW, "/xregister /xlogin - account help"); SendClientMessage(playerid, COLOR_YELLOW, "/help /rules /commands /dive /admin /lock"); SendClientMessage(playerid, COLOR_YELLOW, "/unlock /buycar /callmycar /carservice /clearcar /time"); } //commanda /rules ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- if (strcmp(cmdtext, "/rules", true)==0) { SendClientMessage(playerid, COLOR_YELLOW, "*****( WWW.x-games.TK)*****"); SendClientMessage(playerid, COLOR_RED, "Atentie , este server RPG"); SendClientMessage(playerid, COLOR_RED, "Nu omora , fura masini sau altele sau vei fi bagat la inchisoare"); SendClientMessage(playerid, COLOR_RED, "Nu faci asta in viata reala , shi in special FARA CODURI"); } //dcmd(login,5,cmdtext); // because login has 5 characters // dcmd(register,8,cmdtext); // because register has 8 characters // /dive ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- if(strcmp(cmdtext, "/dive", true) == 0) { if (GetPlayerMoney(playerid) > 999){ GivePlayerMoney(playerid,-1000); new Float:x; new Float:y; new Float:z; GivePlayerWeapon(playerid,46,1); GetPlayerPos(playerid,x,y,z); SetPlayerPos(playerid,x,y,z+500); GameTextForPlayer(playerid,"Diiiive.",2000,5); } else{ SendClientMessage(playerid,COLOR_RED,"Not enough cash."); } return 1; } // /lock ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- if (strcmp(cmdtext, "/lock", true)==0) { if(IsPlayerInAnyVehicle(playerid)) { new State=GetPlayerState(playerid); if(State!=PLAYER_STATE_DRIVER) { SendClientMessage(playerid,0xFFFF00AA,"You can only lock the doors as the driver."); return 1; } new i; for(i=0;i