24.01.2010, 22:14
Can you please put taht when i put again errors but not that please here it is that script
Код:
#include <a_samp> #include <core> #include <float> #define COLOR_WHITE 0xFFFFFFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_YELLOW 0xFFFF00AA #pragma tabsize 0 main() { print("\n----------------------------------"); print(" LasVenturas Party by:ExtremePower\n"); print("----------------------------------\n"); } public OnPlayerConnect(playerid) { GivePlayerMoney(playerid, 10000); SetPlayerArmour(playerid, 100.0); new string[64], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,MAX_PLAYER_NAME); format(string,sizeof string,"**((%s))** Se prikljucio na Party Server. Dobrodosao!",pName); SendClientMessageToAll(0x33AA33AA,string); return 1; } public OnPlayerDisconnect(playerid, reason) { new string[64], name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); switch(reason) { case 0: format(string,sizeof string,"**((%s))** Je napustio server. (Timed out)",name); case 1: format(string,sizeof string,"**((%s))** Je napustio server. (Leaving)",name); case 2: format(string,sizeof string,"**((%s))** Je napustio server. (Kicked/Banned)",name); } SendClientMessageToAll(0xFFFF00AA,string); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { new idx; new cmd[256]; cmd = strtok(cmdtext, idx); if(strcmp(cmd, "/admins", true) == 0) { SendClientMessage(playerid,0xFFFFFFAA," Iz puno razloga ne pokazujemo listu online admina ali zapamti, stalno smo tu!!"); return 1; } if(strcmp(cmd, "/pravila", true) == 0) { SendClientMessage(playerid,0x0FF0C,"[1] Nemoj pitati da postanes admin u igri."); SendClientMessage(playerid,0x0FF0C,"[2] Nemoj ubijati igrace tek kada se stvore u server."); SendClientMessage(playerid,0x0FF0C,"[3] Nemoj koristiti cheatove i modove."); SendClientMessage(playerid,0x0FF0C,"[4] Postuj admine, pomoci ce ti."); SendClientMessage(playerid,0x0FF0C,"[5] Postuj pravila."); SendClientMessage(playerid,0x0FF0C,"[6] Postuj odluke od admina."); SendClientMessage(playerid,0x0FF0C,"Hvala sto igrate na LasVenturas Party serveru!"); return 1; } if(strcmp(cmd, "/tele", true) == 0) { SendClientMessage(playerid,0xFFFFFFAA,"*************************"); SendClientMessage(playerid,0xFFFF00AA,"/dm"); SendClientMessage(playerid,0xFFFFFFAA,"*************************"); return 1; } if(strcmp(cmd, "/pomoc", true) == 0) { SendClientMessage(playerid,0xFFFFFFAA,"Za listu komandi /komande za teleportiranje napisi /tele."); SendClientMessage(playerid,0xFFFFFFAA,"Prije igranja procitaj /pravila."); SendClientMessage(playerid,0xFFFFFFAA,"Za slanje privatne poruke napisi /pm."); SendClientMessage(playerid,0xFFFFFFAA,"Za listu dostupnih animacija napisi /anims"); SendClientMessage(playerid,0xFFFFFFAA,"Hvala sto igrate na LasVenturas Party serveru!"); return 1; } if(strcmp(cmd, "/komande", true) == 0) { SendClientMessage(playerid,0xFFFF00AA,"/anims /tele /admins /pravila /pm /info"); return 1; } if(strcmp(cmd, "/info", true) == 0) { SendClientMessage(playerid,0xFFFFFFAA,"Owner/Vlasnik: ExtremePower"); SendClientMessage(playerid,0xFFFFFFAA,"Skripter: ExtremePower"); SendClientMessage(playerid,0xFFFFFFAA,"Skripta: Skripta pisana od 0 lines!"); SendClientMessage(playerid,0xFFFFFFAA,"Kontakt: MSN: kiki.dubrava@hotmail.com"); SendClientMessage(playerid,0xFFFFFFAA,"Xfire: dollar3tv ili Skype: dollar3tv"); SendClientMessage(playerid,0xFFFFFFAA,"Zemlja: Hrvatska"); return 1; } //--------Mali anti-cheat------// if(GetPlayerPing(playerid) > 500) Kick(playerid); if(GetPlayerWeapon(playerid)> 38) Ban(playerid); //------Dm arena-----/ if(strcmp(cmdtext, "/dm", true) == 0) { GivePlayerWeapon(playerid, 26, 500); GivePlayerWeapon(playerid, 31, 500); SendClientMessage(playerid,0xFFFF00AA,"Dobio si M4 i shootgun zato jer si napisao /DM, sretno u borbi!"); new cartype = GetPlayerVehicleID(playerid); SetPlayerInterior(playerid,0); if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetPlayerPos(playerid,1374.8513,1769.3303,10.8203); } else if(IsPlayerInVehicle(playerid, cartype) == 1) { SetVehiclePos(cartype,1374.8513,1769.3303,10.8203); SetVehicleZAngle(cartype,30.6101); } else { SetPlayerPos(playerid,1374.8513,1769.3303,10.8203); } GameTextForPlayer(playerid,"dobro dosli u DM arenu",2500,3); return 1; } return 0; } public OnPlayerSpawn(playerid) { SetPlayerInterior(playerid,0); TogglePlayerClock(playerid,0); return 1; } public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid, playerid, reason); return 1; } SetupPlayerForClassSelection(playerid) { SetPlayerInterior(playerid,14); SetPlayerPos(playerid,349.0453,193.2271,1014.1797); SetPlayerFacingAngle(playerid, 286.25); SetPlayerCameraPos(playerid,352.9164,194.5702,1014.1875); SetPlayerCameraLookAt(playerid,349.0453,193.2271,1014.1797); } public OnPlayerRequestClass(playerid, classid) { SetupPlayerForClassSelection(playerid); return 1; } public OnGameModeInit() { SetGameModeText("Lv Party"); ShowPlayerMarkers(1); ShowNameTags(1); AllowAdminTeleport(1); AddPlayerClass(83,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0); AddPlayerClass(84,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0); AddPlayerClass(131,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0); AddPlayerClass(171,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0); AddPlayerClass(287,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0); AddPlayerClass(227,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0); AddPlayerClass(264,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0); AddPlayerClass(256,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0); AddPlayerClass(19,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0); AddPlayerClass(18,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0); AddPlayerClass(17,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0); //------------Objekti--------------// CreateObject(1309, 1712.304688, 1606.560791, 21.687422, 0, 0, -22.4999953447); // object CreateObject(3249, 1707.663940, 1608.471802, 9.015626, 0, 0, -22.4999953447); // object (Cool return 1; } 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 OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new string[128]; format(string, sizeof(string), "Ulazis u vozilo %i",vehicleid); SendClientMessage(playerid, 0xFFFFFFFF, string); return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { new string[128]; format(string, sizeof(string), "Izlazis iz vozila %i", vehicleid); SendClientMessage(playerid, 0xFFFFFFFF, string); return 1; }