[ESS]Skull
Membru-
Posts
36 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
News
Documentation
Everything posted by [ESS]Skull
-
filterscripts e gol
-
Ti "l-am refacut" intr-un fel, asta insemnand: O optimizare mai buna si o aranjare mult mai buna. Nu ai pus cateva acolade la Dialog Response.Acum ar trebui sa mearga. // GM BlackFlash #include <a_samp> #include <dini> #define DIALOG_REGISTER1 0 #define DIALOG_REGISTER2 1 #define DIALOG_REGISTER3 2 #define DIALOG_REGISTER4 3 #define DIALOG_LOGIN1 4 #define DIALOG_NOPW1 5 #define DIALOG_NOPW2 6 #define DIALOG_WRONGPW 7 enum Info { sex, //0= male 1=female age, // age :3 logged, // If is player connected } new pInfo[MAX_PLAYERS][Info]; public OnGameModeInit() { // Don't use these lines if it's a filterscript SetGameModeText("Blank Script"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(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 OnPlayerConnect(playerid) { new pname[MAX_PLAYER_NAME], path[200]; GetPlayerName(playerid, pname, sizeof(pname)); format(path, sizeof(path), "/spieler/%s.ini", pname); if(!dini_Exists(path)) { // f the player is not registered ShowPlayerDialog(playerid, DIALOG_REGISTER1, DIALOG_STYLE_INPUT, "Register", "Your Password:", "OK", "Cancel"); } else { //If the player is registered ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Login", "Your Password", "OK", "Cancel"); } return 1; } public OnPlayerDisconnect(playerid, reason) { new pname[MAX_PLAYER_NAME], path[200]; GetPlayerName(playerid, pname, sizeof(pname)); format(path, sizeof(path), "/spieler/%s.ini", pname); dini_IntSet(path, "sex", pInfo[playerid][sex]); dini_IntSet(path, "age", pInfo[playerid][age]); pInfo[playerid][logged] = 0; return 1; } public OnPlayerSpawn(playerid) { return 1; } public OnPlayerDeath(playerid, killerid, reason) { return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new pname[MAX_PLAYER_NAME], path[200]; GetPlayerName(playerid, pname, sizeof(pname)); format(path, sizeof(path), "/spieler/%s.ini", pname); switch(dialogid) { case DIALOG_REGISTER1: { if(!response) return Kick(playerid); new pwlength = strlen(inputtext); if(pwlength > 0) { dini_Create(path); dini_Set(path, "password", inputtext); ShowPlayerDialog(playerid, DIALOG_REGISTER2, DIALOG_STYLE_LIST, "Title", "male\nfemale", "OK", "Cancel"); } else { ShowPlayerDialog(playerid, DIALOG_NOPW1, DIALOG_STYLE_MSGBOX, "Register", "You have to enter a password!", "OK", "Cancel"); } } case DIALOG_REGISTER2: { if(!response) return dini_Remove(path), Kick(playerid); dini_IntSet(path, "sex", listitem); ShowPlayerDialog(playerid, DIALOG_REGISTER3, DIALOG_STYLE_INPUT, "Register", "Your Age?", "OK", "Cancel"); } case DIALOG_REGISTER3: { if(!response) return dini_Remove(path), Kick(playerid); dini_Set(path, "age", inputtext); ShowPlayerDialog(playerid, DIALOG_REGISTER4, DIALOG_STYLE_MSGBOX, "Register", "Your Register is complete!", "OK", "OK"); } case DIALOG_REGISTER4: { pInfo[playerid][sex] = dini_Int(path, "sex"); pInfo[playerid][age] = dini_Int(path, "age"); pInfo[playerid][logged] = 1; } case DIALOG_LOGIN1: { if(!response) return Kick(playerid); new pwlength = strlen(inputtext); if(pwlength > 0) { new pw[200]; format(pw, sizeof(pw), "%s", dini_Get(path, "password")); if(strcmp(inputtext, pw) == 0) { pInfo[playerid][sex] = dini_Int(path, "sex"); pInfo[playerid][age] = dini_Int(path, "age"); pInfo[playerid][logged] = 1; } } else { ShowPlayerDialog(playerid, DIALOG_WRONGPW, DIALOG_STYLE_MSGBOX, "Login", "Wrong Password!", "OK", "Cancel"); } } case DIALOG_NOPW1: { if(!response) return Kick(playerid); ShowPlayerDialog(playerid, DIALOG_REGISTER1, DIALOG_STYLE_INPUT, "Register", "Your Password", "OK", "Cancel"); } case DIALOG_NOPW2: { if(!response) return Kick(playerid); ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Login", "Your Password:", "OK", "Abbrechen"); } case DIALOG_WRONGPW: { if(!response) return Kick(playerid); ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Login", "Your Password:", "OK", "Cancel"); } } return 1; }
-
Incearca: [pawn]// GM BlackFlash #include <a_samp> #include <dini> #define DIALOG_REGISTER1 0 #define DIALOG_REGISTER2 1 #define DIALOG_REGISTER3 2 #define DIALOG_REGISTER4 3 #define DIALOG_LOGIN1 4 #define DIALOG_NOPW1 5 #define DIALOG_NOPW2 6 #define DIALOG_WRONGPW 7 enum Info { sex, //0= male 1=female age, // age :3 logged, // If is player connected } new pInfo[MAX_PLAYERS][info]; public OnGameModeInit() { // Don't use these lines if it's a filterscript SetGameModeText("Blank Script"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(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 OnPlayerConnect(playerid) { new pname[MAX_PLAYER_NAME], path[200]; GetPlayerName(playerid, pname, sizeof(pname)); format(path, sizeof(path), "/spieler/%s.ini", pname); if(!dini_Exists(path)) { // f the player is not registered ShowPlayerDialog(playerid, DIALOG_REGISTER1, DIALOG_STYLE_INPUT, "Register", "Your Password:", "OK", "Cancel"); } else { //If the player is registered ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Login", "Your Password", "OK", "Cancel"); } return 1; } public OnPlayerDisconnect(playerid, reason) { new pname[MAX_PLAYER_NAME], path[200]; GetPlayerName(playerid, pname, sizeof(pname)); format(path, sizeof(path), "/spieler/%s.ini", pname); dini_IntSet(path, "sex", pInfo[playerid][sex]); dini_IntSet(path, "age", pInfo[playerid][age]); pInfo[playerid][logged] = 0; return 1; } public OnPlayerSpawn(playerid) { return 1; } public OnPlayerDeath(playerid, killerid, reason) { return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/mycommand", cmdtext, true, 10) == 0) { // Do something here return 1; } return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new pname[MAX_PLAYER_NAME], path[200]; GetPlayerName(playerid, pname, sizeof(pname)); format(path, sizeof(path), "/spieler/%s.ini", pname); switch(dialogid) { case DIALOG_REGISTER1: { if(!response) { Kick(playerid); } else { new pwlength = strlen(inputtext); if(pwlength > 0) { dini_Create(path); dini_Set(path, "password", inputtext); ShowPlayerDialog(playerid, DIALOG_REGISTER2, DIALOG_STYLE_LIST, "male\nfemale", "OK", "Cancel"); } else { ShowPlayerDialog(playerid, DIALOG_NOPW1, DIALOG_STYLE_MSGBOX, "Register", "You have to enter a password!", "OK", "Cancel"); } } } case DIALOG_REGISTER2: { if(!response) { dini_Remove(path); Kick(playerid); } else { dini_IntSet(path, "sex", listitem); ShowPlayerDialog(playerid, DIALOG_REGISTER3, DIALOG_STYLE_INPUT, "Register", "Your Age?", "OK", "Cancel"); } } case DIALOG_REGISTER3: { if(!response) { dini_Remove(path); Kick(playerid); } else { dini_Set(path, "age", inputtext); ShowPlayerDialog(playerid, DIALOG_REGISTER4, DIALOG_STYLE_MSGBOX, "Register", "Your Register is complete!", "OK", "OK"); } } case DIALOG_REGISTER4: { pInfo[playerid][sex] = dini_Int(path, "sex"); pInfo[playerid][age] = dini_Int(path, "age"); pInfo[playerid][logged] = 1; } case DIALOG_LOGIN1: { if(!response) { Kick(playerid); } else { new pwlength = strlen(inputtext); if(pwlength > 0) { new pw[200]; format(pw, sizeof(pw), "%s", dini_Get(path, "password")); if(strcmp(inputtext, pw) == 0) { pInfo[playerid][sex] = dini_Int(path, "sex"); pInfo[playerid][age] = dini_Int(path, "age"); pInfo[playerid][logged] = 1; } else { ShowPlayerDialog(playerid, DIALOG_WRONGPW, DIALOG_STYLE_MSGBOX, "Login", "Wrong Password!", "OK", "Cancel"); } } else { ShowPlayerDialog(playerid, DIALOG_NOPW2, DIALOG_STYLE_MSGBOX, "Login", "SYou have to enter a password!", "OK", "Cancel"); } } } case DIALOG_NOPW1: { if(!response) { Kick(playerid); } else { ShowPlayerDialog(playerid, DIALOG_REGISTER1, DIALOG_STYLE_INPUT, "Register", "Your Password", "OK", "Cancel"); } } case DIALOG_NOPW2: { if(!response) { Kick(playerid); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Login", "Your Password:", "OK", "Abbrechen"); } } case DIALOG_WRONGPW: { if(!response) { Kick(playerid); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Login", "Your Password:", "OK", "Cancel"); } } return 1; }[/pawn]
-
In cazul acesta...ai gresit sectiunea!
-
[pawn] CreateObject(9259, -3011.363770, 1649.225586, 6.502175, 0.0000, 0.0000, 261.164);[/pawn]
-
"RemoveBuildingForPlayer"se pune la "public OnPlayerConnect(playerid)", adica: [pawn]public OnPlayerConnect(playerid) { RemoveBuildingForPlayer(playerid, 620, 260.2266, -1646.4375, 31.8828, 0.25); //Alte coduri return 1; }[/pawn] si CreateDynamicObject se pune la "public OnGameModeinit/OnFilterscriptinit(playerid)" adica [pawn]public OnGameModeInit(playerid)\OnFilterScriptinit(playerid) { CreateDynamicObject(17656, 258.89999, -1683.09998, 40.30000, 0.50000, 0.00000, 165.00000); //Alte Coduri return 1; }[/pawn] Daca nu ai #include <streamer> in "header", pune-l pentru a-ti functiona CreateDynamicObject!
-
Incearca: CREATE TABLE IF NOT EXISTS `bizz` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Owned` int(11) NOT NULL, `Owner` varchar(25) NOT NULL DEFAULT '0', `Message` varchar(50) NOT NULL, `EntranceX` float NOT NULL, `EntranceY` float NOT NULL, `EntranceZ` float NOT NULL, `ExitX` float NOT NULL, `ExitY` float NOT NULL, `ExitZ` float NOT NULL, `LevelNeeded` int(11) NOT NULL, `BuyPrice` int(11) NOT NULL, `EntranceCost` int(11) NOT NULL, `Till` int(11) NOT NULL, `Locked` int(11) NOT NULL, `Interior` int(11) NOT NULL, `Products` int(11) NOT NULL, `MaxProducts` int(11) NOT NULL, `PriceProd` int(11) NOT NULL, `Virtual` int(11) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 Cel putin la mine a mers.
-
Nu am mai vazut niciodata pana acum: DROP TABLE IF NOT EXISTS Vroiai sa scrii cumva CREATE TABLE IF NOT EXISTS `bizz` ?
-
http://forum.sa-mp.com/showthread.php?t=290640 - Zamaroth's Text Draw Editor http://forum.sa-mp.com/showthread.php?t=376758 - iPLEOMAX's Text Draw Editor
-
http://www.sa-mp.ro/forum/index.php?topic=28097.0 http://www.sa-mp.ro/forum/index.php?topic=25669.0 http://www.sa-mp.ro/forum/index.php?topic=23284.0 List continua..
-
Ne-ai putea arata ultima parte din server_log?