10.03.2010, 13:11
Quote:
#include <a_samp> #include <dudb> #define CZERWONY 0xFF0000FF #define ZIELONY 0x00FF00FF #define ZOLTY 0xFFFF00FF new Zalogowany[MAX_PLAYERS]; public OnFilterScriptInit() { print("\n--------------------------------------"); print(" komendy by hex"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnPlayerConnect(playerid) { return 1; } public OnPlayerDisconnect(playerid, reason) { new Name[MAX_PLAYER_NAME];//tablica z nickiem gracza GetPlayerName(playerid, Name, sizeof(Name));//pobiera nick gracza do poprzedniej tablicy if(Zalogowany[playerid]==1)//sprawdza czy gracz jest zaloogwany { new Float: X, Float: Y, Float: Z;//tablica z pozycja; gracza GetPlayerPos(playerid, X, Y, Z);//pobiera pozycje; gracza dini_FloatSet(Name, "X", X);//zapisuje pozycje X dini_FloatSet(Name, "Y", Y);//zapisuje pozycje Y dini_FloatSet(Name, "Z", Z);//zapisuje pozycje Z Zalogowany[playerid]=0;//ustawia w tablicy gracza jako nie zalogowanego } 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 OnPlayerPrivmsg(playerid, recieverid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256],idx; new string[128]; new tmp[256]; if(strcmp(cmdtext, "/niespodzianka", true) == 0) { new string[50]; new imie[MAX_PLAYER_NAME]; GetPlayerName(playerid,imie, sizeof(imie)); format(string, sizeof(string), "%s jest botem, no i ch** ?",imie); SendClientMessageToAll(0xC2A2DAAA,string); return 1; }//koniec cmd if(strcmp(cmdtext, "/lotnisko-lv", true) == 0) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetVehiclePos(GetPlayerVehicleID(playerid),1594.41 86,1443.9087,10.828; SetVehicleZAngle(GetPlayerVehicleID(playerid),20); } else { SetPlayerFacingAngle(playerid,20); SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,1594.4186,1443.9087,10.828 ; } return 1; }//koniec cmd if(strcmp(cmdtext, "/drag3", true) == 0) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetVehiclePos(GetPlayerVehicleID(playerid),-1084.2367,412.3698,14.1484); SetVehicleZAngle(GetPlayerVehicleID(playerid),20); } else { SetPlayerFacingAngle(playerid,20); SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,-1084.2367,412.3698,14.1484); } return 1; }//koniec cmd if(!strcmp(cmd, "/zarejestruj", true))//nie musze t?umaczyc' to jest podstawa { new Name[MAX_PLAYER_NAME];//tablica z nickiem gracza GetPlayerName(playerid, Name, sizeof(Name));//pobiera nick do tablicy Name if(Zalogowany[playerid]==1)//sprawdza czy gracz jest zaloogwany { SendClientMessage(playerid,CZERWONY,"Juz. jestes' zalogowany!");//wysy?a wiadomos'c' return 1; } tmp = strtok(cmdtext,idx);//sprawdza czy gracz poda? has?o if(!strlen(tmp))//jez.eli nie to: { SendClientMessage(playerid,ZIELONY,"Wpisz: /zarejestruj [has?o]");//wysy?a wiadomos'c' do niego return 1; } if(!dini_Exists(Name))//sprawdza czy nick jest juz. zarejestrowany jez.eli tak to: { SendClientMessage(playerid,CZERWONY,"Konto juz. istnieje!");//wysy?a wiadomos'c' SendClientMessage(playerid,ZIELONY,"Wpisz: /zaloguj [has?o], aby sie; zalogowac'.");//wysy?a wiadomos'c' return 1; } //jez.eli gracz poda? has?o to: dini_Create(Name);//tworzy plik z nickiem gracza dini_IntSet(Name, "HASLO", udb_hash(tmp));//zapisuje has?o jednoczes'nie je koduja;c dini_IntSet(Name, "ZABOJSTWA", 0);//zapisuje zabуjstwa ustawiaja;c je na 0 dini_IntSet(Name, "SAMOBOJSTWA", 0);//zapisuje samobуjstwa ustawiaja;c je na 0 SendClientMessage(playerid,ZIELONY,"> Zarejestrowano <");//wysy?a wiadomos'c do gracza format(string,sizeof(string),"Twoje has?o: %s",tmp);//wysy?a wiadomos'c' do gracza z has?em SendClientMessage(playerid,ZOLTY,string);//wysy?a wiadomos'c' SendClientMessage(playerid,ZIELONY,"> Automatycznie zalogowano <");//wysy?a wiadomos'c' do gracza Zalogowany[playerid]=1;//ustawia z.e gracz jest zalogowany ] return 1; } return 0; } public OnPlayerInfoChange(playerid) { 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 OnRconCommand(cmd[]) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } |
Quote:
D:\serwer gta\filterscripts\komendy.pwn(86) : warning 219: local variable string shadows a variable at a preceding level D:\serwer gta\filterscripts\komendy.pwn(159) : error 029: invalid expression, assumed zero D:\serwer gta\filterscripts\komendy.pwn(159 -- 160) : warning 215: expression has no effect D:\serwer gta\filterscripts\komendy.pwn(160) : error 001: expected token: ;, but found return Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |