Jump to content

Pinki95

Membru
  • Posts

    130
  • Joined

  • Last visited

    Never

Everything posted by Pinki95

  1. Am incercat sa fac asta singur dar imi da asta: C:\Documents and Settings\SkyNet\Desktop\Untitled.pwn(41) : warning 201: redefinition of constant/macro (symbol "teamid") C:\Documents and Settings\SkyNet\Desktop\Untitled.pwn(174) : error 002: only a single statement (or expression) can follow each "case" C:\Documents and Settings\SkyNet\Desktop\Untitled.pwn(174) : warning 215: expression has no effect C:\Documents and Settings\SkyNet\Desktop\Untitled.pwn(175) : warning 209: function "T_NewJob" should return a value Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. [pawn]#include <a_samp> #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 #define COLOR_ORANGE 0xFFA500FF #define COLOR_LIMEGREEN 0x32CD32FF #define COLOR_ROYALBLUE 0x4169E1FF #define COLOR_SALMON 0xFA8072FF #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_BLUE 0x0000BBAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_RED 0xAA3333AA enum MisLocationsEnum { ID, LoadName[128], Float:LoadX, Float:LoadY, Float:LoadZ, Float:UnloadX, Float:UnloadY, Float:UnloadZ, Pay } new MisLocations[][MisLocationsEnum] = { {0, "Beer from Red County Brewery to Bone County Diner",-24.4073,-281.8898,5.9985,-305.4319,1315.6797,54.6189, 5980}, {1, "Fuel from LV Oil Refinery to LV Dirtring",266.8981,1416.5417,10.2001,1097.5164,1741.7422,10.5474, 5700}, {2, "Vehicle Parts from SF Airport ATC to Wang Cars",-1268.8223,13.6925,14.8682,-1986.3477,253.9728,35.8985, 3000}, {3, "Fuel from SF Oil Refinery to RS Haul",-1016.3634,-688.2434,32.7284,-55.3397,-1138.2479,0.8052, 18770} }; #define TEAM_TRUCKER 1 #define TEAM_PILOT 2 #define teamid TEAM_TRUCKER #define teamid TEAM_PILOT new iMissionText[512][MAX_PLAYERS], Float:unx[MAX_PLAYERS], Float:uny[MAX_PLAYERS], Float:unz[MAX_PLAYERS], iPay[MAX_PLAYERS], MissionStatus[MAX_PLAYERS]; main(){} public OnGameModeInit() { AddPlayerClass(72, -2105.3228, -124.2982, 37.2531, 0.0, 0,0,0,0,0,0);//Trucker - SF AddPlayerClass(98, -2105.3228, -124.2982, 37.2531, 0.0, 0,0,0,0,0,0);//Trucker - SF return 1; } public OnPlayerRequestClass(playerid, classid) { switch (classid) { case 0: { GameTextForPlayer(playerid, "Trucker", 3000, 4); SetPlayerTeam(playerid, TEAM_TRUCKER); } case 1: { GameTextForPlayer(playerid, "Pilot", 3000, 3); SetPlayerTeam(playerid, TEAM_PILOT); } } return 1; } public OnPlayerSpawn(playerid) { if(GetPlayerTeam(playerid) == TEAM_TRUCKER) { SetPlayerColor(playerid, COLOR_GREEN); } if(GetPlayerTeam(playerid) == TEAM_PILOT) { SetPlayerColor(playerid, COLOR_RED); } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(work, 4, cmdtext); dcmd(stopwork, 8, cmdtext); return 0; } dcmd_work(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_TRUCKER) return T_NewJob(playerid); if(GetPlayerTeam(playerid) == TEAM_PILOT) return T_NewJob(playerid); return 1; } dcmd_stopwork(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_TRUCKER) return StopWork(playerid); if(GetPlayerTeam(playerid) == TEAM_PILOT) return StopWork(playerid); return 1; } stock T_NewJob(playerid) { new vID = GetPlayerVehicleID(playerid); switch (teamid) { case 0: { if(GetVehicleModel(vID)== 403 || GetVehicleModel(vID)== 515 || GetVehicleModel(vID) == 514) { if(IsTrailerAttachedToVehicle(vID)) { MissionStatus[playerid] = 1; new MisRand = random(sizeof(MisLocations)); new LoadText[128], Float:x, Float:y, Float:z; x = MisLocations[MisRand][LoadX]; y = MisLocations[MisRand][LoadY]; z = MisLocations[MisRand][LoadZ]; unx[playerid] = MisLocations[MisRand][unloadX]; uny[playerid] = MisLocations[MisRand][unloadY]; unz[playerid] = MisLocations[MisRand][unloadZ]; iPay[playerid] = MisLocations[MisRand][Pay]; SetPlayerCheckpoint(playerid, x, y, z, 7); format(LoadText, 128, "%s",MisLocations[MisRand][LoadName]); SendClientMessage(playerid, COLOR_GREEN, "Mission:"); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); SendClientMessage(playerid, COLOR_GREEN, ""); SendClientMessage(playerid, 0xFFFFFFFF, LoadText); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); } else { SendClientMessage(playerid, COLOR_RED, "You need a trailer!"); } } else { SendClientMessage(playerid, COLOR_RED, "You must be in a Truck to perform this!"); } } case 1: { if(GetVehicleModel(vID)== 511 || GetVehicleModel(vID)== 519 || GetVehicleModel(vID) == 553) { MissionStatus[playerid] = 1; new MisRand = random(sizeof(MisLocations)); new LoadText[128], Float:x, Float:y, Float:z; x = MisLocations[MisRand][LoadX]; y = MisLocations[MisRand][LoadY]; z = MisLocations[MisRand][LoadZ]; unx[playerid] = MisLocations[MisRand][unloadX]; uny[playerid] = MisLocations[MisRand][unloadY]; unz[playerid] = MisLocations[MisRand][unloadZ]; iPay[playerid] = MisLocations[MisRand][Pay]; SetPlayerCheckpoint(playerid, x, y, z, 7); format(LoadText, 128, "%s",MisLocations[MisRand][LoadName]); SendClientMessage(playerid, COLOR_GREEN, "Mission:"); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); SendClientMessage(playerid, COLOR_GREEN, ""); SendClientMessage(playerid, 0xFFFFFFFF, LoadText); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); } else { SendClientMessage(playerid, COLOR_RED, "You must be in a Plane to perform this!"); } } return 1; } stock StopWork(playerid) { DisablePlayerCheckpoint(playerid); SendClientMessage(playerid, COLOR_RED, "You chose to cancel the mission and got fined $100"); GivePlayerMoney(playerid, -100); MissionStatus[playerid] = 0; return 1; } public OnPlayerEnterCheckpoint(playerid) { CheckpointEntered(playerid); return 1; } stock CheckpointEntered(playerid) { new gString[128]; new vID = GetPlayerVehicleID(playerid); if(!IsTrailerAttachedToVehicle(vID)) return SendClientMessage(playerid, COLOR_RED, "You need a trailer to unload!"); if(MissionStatus[playerid] == 1) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, unx[playerid], uny[playerid], unz[playerid], 7); SendClientMessage(playerid, COLOR_ORANGE, "Loaded. Please head to the second checkpoint!"); MissionStatus[playerid] = 2; } else if(MissionStatus[playerid] == 2) { DisablePlayerCheckpoint(playerid); GivePlayerMoney(playerid, iPay[playerid]); SendClientMessage(playerid, COLOR_GREEN, "Well done! You completed the mission!"); format(gString, 512, "%s has completed mission: %s", pName(playerid), iMissionText[playerid]); SendClientMessageToAll(COLOR_GREEN, gString); SetPlayerScore(playerid, GetPlayerScore(playerid)+2); MissionStatus[playerid] = 0; } return 1; } stock pName(PN) { new PX[MAX_PLAYER_NAME]; GetPlayerName(PN, PX, sizeof(PX)); return PX; }[/pawn]
  2. Pinki95

    Problema

    Intra aici: http://sa-mp.com/download.php dupa care descarci serverul si iei de acolo includele toate si le inlocuiesti
  3. Gamemode: [pawn]#include <a_samp> #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 #define COLOR_ORANGE 0xFFA500FF #define COLOR_LIMEGREEN 0x32CD32FF #define COLOR_ROYALBLUE 0x4169E1FF #define COLOR_SALMON 0xFA8072FF #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_BLUE 0x0000BBAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_RED 0xAA3333AA enum MisLocationsEnum { ID, LoadName[128], Float:LoadX, Float:LoadY, Float:LoadZ, Float:UnloadX, Float:UnloadY, Float:UnloadZ, Pay } new MisLocations[][MisLocationsEnum] = { {0, "Beer from Red County Brewery to Bone County Diner",-24.4073,-281.8898,5.9985,-305.4319,1315.6797,54.6189, 5980}, {1, "Fuel from LV Oil Refinery to LV Dirtring",266.8981,1416.5417,10.2001,1097.5164,1741.7422,10.5474, 5700}, {2, "Vehicle Parts from SF Airport ATC to Wang Cars",-1268.8223,13.6925,14.8682,-1986.3477,253.9728,35.8985, 3000}, {3, "Fuel from SF Oil Refinery to RS Haul",-1016.3634,-688.2434,32.7284,-55.3397,-1138.2479,0.8052, 18770} }; #define TEAM_TRUCKER 1 new iMissionText[512][MAX_PLAYERS], Float:unx[MAX_PLAYERS], Float:uny[MAX_PLAYERS], Float:unz[MAX_PLAYERS], iPay[MAX_PLAYERS], MissionStatus[MAX_PLAYERS]; main(){} public OnGameModeInit() { AddPlayerClass(72, -2105.3228, -124.2982, 37.2531, 0.0, 0,0,0,0,0,0);//Trucker - SF return 1; } public OnPlayerRequestClass(playerid, classid) { switch (classid) { case 0: { GameTextForPlayer(playerid, "Trucker", 3000, 4); SetPlayerTeam(playerid, TEAM_TRUCKER); } } return 1; } public OnPlayerSpawn(playerid) { if(GetPlayerTeam(playerid) == TEAM_TRUCKER) { SetPlayerColor(playerid, COLOR_GREEN); } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(work, 4, cmdtext); dcmd(stopwork, 8, cmdtext); return 0; } dcmd_work(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_TRUCKER) return T_NewJob(playerid); return 1; } dcmd_stopwork(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_TRUCKER) return StopWork(playerid); return 1; } stock T_NewJob(playerid) { new vID = GetPlayerVehicleID(playerid); if(GetVehicleModel(vID)== 403 || GetVehicleModel(vID)== 515 || GetVehicleModel(vID) == 514) { if(IsTrailerAttachedToVehicle(vID)) { MissionStatus[playerid] = 1; new MisRand = random(sizeof(MisLocations)); new LoadText[128], Float:x, Float:y, Float:z; x = MisLocations[MisRand][LoadX]; y = MisLocations[MisRand][LoadY]; z = MisLocations[MisRand][LoadZ]; unx[playerid] = MisLocations[MisRand][unloadX]; uny[playerid] = MisLocations[MisRand][unloadY]; unz[playerid] = MisLocations[MisRand][unloadZ]; iPay[playerid] = MisLocations[MisRand][Pay]; SetPlayerCheckpoint(playerid, x, y, z, 7); format(LoadText, 128, "%s",MisLocations[MisRand][LoadName]); SendClientMessage(playerid, COLOR_GREEN, "Mission:"); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); SendClientMessage(playerid, COLOR_GREEN, ""); SendClientMessage(playerid, 0xFFFFFFFF, LoadText); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); } else { SendClientMessage(playerid, COLOR_RED, "You need a trailer!"); } } else { SendClientMessage(playerid, COLOR_RED, "You must be in a Truck to perform this!"); } return 1; } stock StopWork(playerid) { DisablePlayerCheckpoint(playerid); SendClientMessage(playerid, COLOR_RED, "You chose to cancel the mission and got fined $100"); GivePlayerMoney(playerid, -100); MissionStatus[playerid] = 0; return 1; } public OnPlayerEnterCheckpoint(playerid) { CheckpointEntered(playerid); return 1; } stock CheckpointEntered(playerid) { new gString[128]; new vID = GetPlayerVehicleID(playerid); if(!IsTrailerAttachedToVehicle(vID)) return SendClientMessage(playerid, COLOR_RED, "You need a trailer to unload!"); if(MissionStatus[playerid] == 1) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, unx[playerid], uny[playerid], unz[playerid], 7); SendClientMessage(playerid, COLOR_ORANGE, "Loaded. Please head to the second checkpoint!"); MissionStatus[playerid] = 2; } else if(MissionStatus[playerid] == 2) { DisablePlayerCheckpoint(playerid); GivePlayerMoney(playerid, iPay[playerid]); SendClientMessage(playerid, COLOR_GREEN, "Well done! You completed the mission!"); format(gString, 512, "%s has completed mission: %s", pName(playerid), iMissionText[playerid]); SendClientMessageToAll(COLOR_GREEN, gString); SetPlayerScore(playerid, GetPlayerScore(playerid)+2); MissionStatus[playerid] = 0; } return 1; } stock pName(PN) { new PX[MAX_PLAYER_NAME]; GetPlayerName(PN, PX, sizeof(PX)); return PX; }[/pawn] cum sa fac sa adaug asta in Gamemode?: [pawn]#include <a_samp> #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 #define COLOR_ORANGE 0xFFA500FF #define COLOR_LIMEGREEN 0x32CD32FF #define COLOR_ROYALBLUE 0x4169E1FF #define COLOR_SALMON 0xFA8072FF #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_BLUE 0x0000BBAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_RED 0xAA3333AA enum MisLocationsEnum { ID, LoadName[128], Float:LoadX, Float:LoadY, Float:LoadZ, Float:UnloadX, Float:UnloadY, Float:UnloadZ, Pay } new MisLocations[][MisLocationsEnum] = { {0, "Beer from Red County Brewery to Bone County Diner",-24.4073,-281.8898,5.9985,-305.4319,1315.6797,54.6189, 5980}, {1, "Fuel from LV Oil Refinery to LV Dirtring",266.8981,1416.5417,10.2001,1097.5164,1741.7422,10.5474, 5700}, {2, "Vehicle Parts from SF Airport ATC to Wang Cars",-1268.8223,13.6925,14.8682,-1986.3477,253.9728,35.8985, 3000}, {3, "Fuel from SF Oil Refinery to RS Haul",-1016.3634,-688.2434,32.7284,-55.3397,-1138.2479,0.8052, 18770} }; #define TEAM_PILOT 1 new iMissionText[512][MAX_PLAYERS], Float:unx[MAX_PLAYERS], Float:uny[MAX_PLAYERS], Float:unz[MAX_PLAYERS], iPay[MAX_PLAYERS], MissionStatus[MAX_PLAYERS]; main(){} public OnGameModeInit() { AddPlayerClass(98, -2105.3228, -124.2982, 37.2531, 0.0, 0,0,0,0,0,0);//Trucker - SF return 1; } public OnPlayerRequestClass(playerid, classid) { switch (classid) { case 0: { GameTextForPlayer(playerid, "Pilot", 3000, 4); SetPlayerTeam(playerid, TEAM_PILOT); } } return 1; } public OnPlayerSpawn(playerid) { if(GetPlayerTeam(playerid) == TEAM_PILOT) { SetPlayerColor(playerid, COLOR_RED); } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(work, 4, cmdtext); dcmd(stopwork, 8, cmdtext); return 0; } dcmd_work(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_PILOT) return T_NewJob(playerid); return 1; } dcmd_stopwork(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_PILOT) return StopWork(playerid); return 1; } stock T_NewJob(playerid) { new vID = GetPlayerVehicleID(playerid); if(GetVehicleModel(vID)== 511 || GetVehicleModel(vID)== 519 || GetVehicleModel(vID) == 553) { MissionStatus[playerid] = 1; new MisRand = random(sizeof(MisLocations)); new LoadText[128], Float:x, Float:y, Float:z; x = MisLocations[MisRand][LoadX]; y = MisLocations[MisRand][LoadY]; z = MisLocations[MisRand][LoadZ]; unx[playerid] = MisLocations[MisRand][unloadX]; uny[playerid] = MisLocations[MisRand][unloadY]; unz[playerid] = MisLocations[MisRand][unloadZ]; iPay[playerid] = MisLocations[MisRand][Pay]; SetPlayerCheckpoint(playerid, x, y, z, 7); format(LoadText, 128, "%s",MisLocations[MisRand][LoadName]); SendClientMessage(playerid, COLOR_GREEN, "Mission:"); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); SendClientMessage(playerid, COLOR_GREEN, ""); SendClientMessage(playerid, 0xFFFFFFFF, LoadText); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); } else { SendClientMessage(playerid, COLOR_RED, "You must be in a Plane to perform this!"); } return 1; } stock StopWork(playerid) { DisablePlayerCheckpoint(playerid); SendClientMessage(playerid, COLOR_RED, "You chose to cancel the mission and got fined $100"); GivePlayerMoney(playerid, -100); MissionStatus[playerid] = 0; return 1; } public OnPlayerEnterCheckpoint(playerid) { CheckpointEntered(playerid); return 1; } stock CheckpointEntered(playerid) { new gString[128]; if(MissionStatus[playerid] == 1) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, unx[playerid], uny[playerid], unz[playerid], 7); SendClientMessage(playerid, COLOR_ORANGE, "Loaded. Please head to the second checkpoint!"); MissionStatus[playerid] = 2; } else if(MissionStatus[playerid] == 2) { DisablePlayerCheckpoint(playerid); GivePlayerMoney(playerid, iPay[playerid]); SendClientMessage(playerid, COLOR_GREEN, "Well done! You completed the mission!"); format(gString, 512, "%s has completed mission: %s", pName(playerid), iMissionText[playerid]); SendClientMessageToAll(COLOR_GREEN, gString); SetPlayerScore(playerid, GetPlayerScore(playerid)+2); MissionStatus[playerid] = 0; } return 1; } stock pName(PN) { new PX[MAX_PLAYER_NAME]; GetPlayerName(PN, PX, sizeof(PX)); return PX; }[/pawn]
  4. este server ppc_trucking *(cred ca da)
  5. Mi-am luat un host de pe gazduirejocuri.ro si mi-am urcat serverul pe host si cand vreau sa intru pe server nu imi apare dialogul Login/Register iar daca il pornesc serverul local fara host merge dialogul Nu stiu ce sa fac Help!
  6. Cum as putea face un WarGangZone? Help: [pawn]#include <a_samp> #define TEAM_GROVE 1 #define TEAM_BALLAS 2 #define TEAM_VAGOS 3 enum eZone { Float:zMinX, Float:zMinY, Float:zMaxX, Float:zMaxY, zTeam } new ZoneInfo[][eZone] = { {2337.9004,-1808.8383,2590.2043,-1610.3673,TEAM_GROVE}, {2084.7,-1808.8383,2337.9004,-1610.3673,TEAM_BALLAS}, {2590.2043,-1808.8383,2842.3,-1610.3673,TEAM_VAGOS} }; new ZoneID[sizeof(ZoneInfo)]; {2337.9004,-1808.8383,2590.2043,-1610.3673,TEAM_GROVE}, for(new i=0; i < sizeof(ZoneInfo); i++) { ZoneID = GangZoneCreate(ZoneInfo[zMinX], ZoneInfo[zMinY], ZoneInfo[zMaxX], ZoneInfo[zMaxY]); } for(new i=0; i < sizeof(ZoneInfo); i++) { GangZoneShowForPlayer(playerid, ZoneID, GetTeamZoneColor(ZoneInfo[zTeam])); } stock GetTeamZoneColor(teamid) { switch(teamid) { case TEAM_GROVE: return 0x00FF0088; case TEAM_BALLAS: return 0xFF00FF88; case TEAM_VAGOS: return 0xFFFF0088; } return -1; } new ZoneInfo[][eZone] = { {2337.9004,-1808.8383,2590.2043,-1610.3673,TEAM_GROVE}, {2084.7,-1808.8383,2337.9004,-1610.3673,TEAM_BALLAS}, {2590.2043,-1808.8383,2842.3,-1610.3673,TEAM_VAGOS}, {1429.3770,-1732.4554,1529.1932,-1592.1989,TEAM_GROVE} }; new ZoneAttacker[sizeof(ZoneInfo)] = {-1, ...}; new ZoneAttackTime[sizeof(ZoneInfo)]; for(new i=0; i < sizeof(ZoneInfo); i++) { GangZoneShowForPlayer(playerid, ZoneID, GetTeamZoneColor(ZoneInfo[zTeam])); if(ZoneAttacker != -1) GangZoneFlashForPlayer(playerid, ZoneID, GetTeamZoneColor(ZoneAttacker)); } #define TAKEOVER_TIME 120 // how many seconds needed to take over the zone #define MIN_MEMBERS_TO_START_WAR 3 // how many team members needed in a zone to start a war new Teams[] = { TEAM_GROVE, TEAM_BALLAS, TEAM_VAGOS }; stock IsPlayerInZone(playerid, zoneid) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); return (x > ZoneInfo[zoneid][zMinX] && x < ZoneInfo[zoneid][zMaxX] && y > ZoneInfo[zoneid][zMinY] && y < ZoneInfo[zoneid][zMaxY]); } stock GetPlayersInZone(zoneid, teamid) { new count; for(new i=0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && GetPlayerTeam(i) == teamid && IsPlayerInZone(i, zoneid)) { count++; } } return count; } public ZoneTimer() { for(new i=0; i < sizeof(ZoneInfo); i++) // loop all zones { if(ZoneAttacker != -1) // zone is being attacked { if(GetPlayersInZone(i, ZoneAttacker) >= MIN_MEMBERS_TO_START_WAR) // team has enough members in the zone { ZoneAttackTime++; if(ZoneAttackTime == TAKEOVER_TIME) // zone has been under attack for enough time and attackers take over the zone { GangZoneStopFlashForAll(ZoneID); ZoneInfo[zTeam] = ZoneAttacker; GangZoneShowForAll(ZoneID, GetTeamZoneColor(ZoneInfo[zTeam])); // update the zone color for new team ZoneAttacker = -1; } } else // attackers failed to take over the zone { GangZoneStopFlashForAll(ZoneID); ZoneAttacker = -1; } } else // check if somebody is attacking { for(new t=0; t < sizeof(Teams); t++) // loop all teams { if(Teams[t] != ZoneInfo[zTeam] && GetPlayersInZone(i, Teams[t]) >= MIN_MEMBERS_TO_START_WAR) // if there are enough enemies in the zone { ZoneAttacker = Teams[t]; ZoneAttackTime = 0; GangZoneFlashForAll(ZoneID, GetTeamZoneColor(ZoneAttacker)); } } } } } #define TAKEOVER_TIME 120 // how many seconds needed to take over the zone #define MIN_DEATHS_TO_START_WAR 3 // how many team members must be killed in a zone to start a war SetTimer("ZoneTimer", 1000, true); public ZoneTimer() { for(new i=0; i < sizeof(ZoneInfo); i++) // loop all zones { if(ZoneAttacker != -1) // zone is being attacked { if(GetPlayersInZone(i, ZoneAttacker) >= 1) // there must be at least 1 attacker left { ZoneAttackTime++; if(ZoneAttackTime == TAKEOVER_TIME) // zone has been under attack for enough time and attackers take over the zone { GangZoneStopFlashForAll(ZoneID); ZoneInfo[zTeam] = ZoneAttacker; GangZoneShowForAll(ZoneID, GetTeamZoneColor(ZoneInfo[zTeam])); // update the zone color for new team ZoneAttacker = -1; } } else // attackers failed to take over the zone { GangZoneStopFlashForAll(ZoneID); ZoneAttacker = -1; } } } } if(IsPlayerConnected(killerid) && GetPlayerTeam(playerid) != GetPlayerTeam(killerid)) // not a suicide or team kill { new zoneid = GetPlayerZone(playerid); if(zoneid != -1 && ZoneInfo[zoneid][zTeam] == GetPlayerTeam(playerid)) // zone member has been killed in the zone { ZoneDeaths[zoneid]++; if(ZoneDeaths[zoneid] == MIN_DEATHS_TO_START_WAR) { ZoneDeaths[zoneid] = 0; ZoneAttacker[zoneid] = GetPlayerTeam(killerid); ZoneAttackTime[zoneid] = 0; GangZoneFlashForAll(ZoneID[zoneid], GetTeamZoneColor(ZoneAttacker[zoneid])); } } } new ZoneDeaths[sizeof(ZoneInfo)]; stock GetPlayerZone(playerid) { for(new i=0; i < sizeof(ZoneInfo); i++) { if(IsPlayerInZone(playerid, i)) { return i; } } return -1; }[/pawn] Inspirat din: http://forum.sa-mp.com/showthread.php?t=276352
  7. Exemplu job trucking: [pawn]#include <a_samp> #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 #define COLOR_ORANGE 0xFFA500FF #define COLOR_LIMEGREEN 0x32CD32FF #define COLOR_ROYALBLUE 0x4169E1FF #define COLOR_SALMON 0xFA8072FF #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_BLUE 0x0000BBAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_RED 0xAA3333AA enum MisLocationsEnum { ID, LoadName[128], Float:LoadX, Float:LoadY, Float:LoadZ, Float:UnloadX, Float:UnloadY, Float:UnloadZ, Pay } new MisLocations[][MisLocationsEnum] = { {0, "Beer from Red County Brewery to Bone County Diner",-24.4073,-281.8898,5.9985,-305.4319,1315.6797,54.6189, 5980}, {1, "Fuel from LV Oil Refinery to LV Dirtring",266.8981,1416.5417,10.2001,1097.5164,1741.7422,10.5474, 5700}, {2, "Vehicle Parts from SF Airport ATC to Wang Cars",-1268.8223,13.6925,14.8682,-1986.3477,253.9728,35.8985, 3000}, {3, "Fuel from SF Oil Refinery to RS Haul",-1016.3634,-688.2434,32.7284,-55.3397,-1138.2479,0.8052, 18770} }; #define TEAM_TRUCKER 1 new iMissionText[512][MAX_PLAYERS], Float:unx[MAX_PLAYERS], Float:uny[MAX_PLAYERS], Float:unz[MAX_PLAYERS], iPay[MAX_PLAYERS], MissionStatus[MAX_PLAYERS]; main(){} public OnGameModeInit() { AddPlayerClass(72, -2105.3228, -124.2982, 37.2531, 0.0, 0,0,0,0,0,0);//Trucker - SF return 1; } public OnPlayerRequestClass(playerid, classid) { switch (classid) { case 0: { GameTextForPlayer(playerid, "Trucker", 3000, 4); SetPlayerTeam(playerid, TEAM_TRUCKER); } } return 1; } public OnPlayerSpawn(playerid) { if(GetPlayerTeam(playerid) == TEAM_TRUCKER) { SetPlayerColor(playerid, COLOR_GREEN); } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(work, 4, cmdtext); dcmd(stopwork, 8, cmdtext); return 0; } dcmd_work(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_TRUCKER) return T_NewJob(playerid); return 1; } dcmd_stopwork(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_TRUCKER) return StopWork(playerid); return 1; } stock T_NewJob(playerid) { new vID = GetPlayerVehicleID(playerid); if(GetVehicleModel(vID)== 403 || GetVehicleModel(vID)== 515 || GetVehicleModel(vID) == 514) { if(IsTrailerAttachedToVehicle(vID)) { MissionStatus[playerid] = 1; new MisRand = random(sizeof(MisLocations)); new LoadText[128], Float:x, Float:y, Float:z; x = MisLocations[MisRand][LoadX]; y = MisLocations[MisRand][LoadY]; z = MisLocations[MisRand][LoadZ]; unx[playerid] = MisLocations[MisRand][unloadX]; uny[playerid] = MisLocations[MisRand][unloadY]; unz[playerid] = MisLocations[MisRand][unloadZ]; iPay[playerid] = MisLocations[MisRand][Pay]; SetPlayerCheckpoint(playerid, x, y, z, 7); format(LoadText, 128, "%s",MisLocations[MisRand][LoadName]); SendClientMessage(playerid, COLOR_GREEN, "Mission:"); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); SendClientMessage(playerid, COLOR_GREEN, ""); SendClientMessage(playerid, 0xFFFFFFFF, LoadText); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); } else { SendClientMessage(playerid, COLOR_RED, "You need a trailer!"); } } else { SendClientMessage(playerid, COLOR_RED, "You must be in a Truck to perform this!"); } return 1; } stock StopWork(playerid) { DisablePlayerCheckpoint(playerid); SendClientMessage(playerid, COLOR_RED, "You chose to cancel the mission and got fined $100"); GivePlayerMoney(playerid, -100); MissionStatus[playerid] = 0; return 1; } public OnPlayerEnterCheckpoint(playerid) { CheckpointEntered(playerid); return 1; } stock CheckpointEntered(playerid) { new gString[128]; new vID = GetPlayerVehicleID(playerid); if(!IsTrailerAttachedToVehicle(vID)) return SendClientMessage(playerid, COLOR_RED, "You need a trailer to unload!"); if(MissionStatus[playerid] == 1) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, unx[playerid], uny[playerid], unz[playerid], 7); SendClientMessage(playerid, COLOR_ORANGE, "Loaded. Please head to the second checkpoint!"); MissionStatus[playerid] = 2; } else if(MissionStatus[playerid] == 2) { DisablePlayerCheckpoint(playerid); GivePlayerMoney(playerid, iPay[playerid]); SendClientMessage(playerid, COLOR_GREEN, "Well done! You completed the mission!"); format(gString, 512, "%s has completed mission: %s", pName(playerid), iMissionText[playerid]); SendClientMessageToAll(COLOR_GREEN, gString); SetPlayerScore(playerid, GetPlayerScore(playerid)+2); MissionStatus[playerid] = 0; } return 1; } stock pName(PN) { new PX[MAX_PLAYER_NAME]; GetPlayerName(PN, PX, sizeof(PX)); return PX; }[/pawn]
  8. Sa rezolvat: [pawn]#include <a_samp> #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 #define COLOR_ORANGE 0xFFA500FF #define COLOR_LIMEGREEN 0x32CD32FF #define COLOR_ROYALBLUE 0x4169E1FF #define COLOR_SALMON 0xFA8072FF #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_BLUE 0x0000BBAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_RED 0xAA3333AA enum MisLocationsEnum { ID, LoadName[128], Float:LoadX, Float:LoadY, Float:LoadZ, Float:UnloadX, Float:UnloadY, Float:UnloadZ, Pay } new MisLocations[][MisLocationsEnum] = { {0, "Beer from Red County Brewery to Bone County Diner",-24.4073,-281.8898,5.9985,-305.4319,1315.6797,54.6189, 5980}, {1, "Fuel from LV Oil Refinery to LV Dirtring",266.8981,1416.5417,10.2001,1097.5164,1741.7422,10.5474, 5700}, {2, "Vehicle Parts from SF Airport ATC to Wang Cars",-1268.8223,13.6925,14.8682,-1986.3477,253.9728,35.8985, 3000}, {3, "Fuel from SF Oil Refinery to RS Haul",-1016.3634,-688.2434,32.7284,-55.3397,-1138.2479,0.8052, 18770} }; #define TEAM_TRUCKER 1 new iMissionText[512][MAX_PLAYERS], Float:unx[MAX_PLAYERS], Float:uny[MAX_PLAYERS], Float:unz[MAX_PLAYERS], iPay[MAX_PLAYERS], MissionStatus[MAX_PLAYERS]; main(){} public OnGameModeInit() { AddPlayerClass(72, -2105.3228, -124.2982, 37.2531, 0.0, 0,0,0,0,0,0);//Trucker - SF return 1; } public OnPlayerRequestClass(playerid, classid) { switch (classid) { case 0: { GameTextForPlayer(playerid, "Trucker", 3000, 4); SetPlayerTeam(playerid, TEAM_TRUCKER); } } return 1; } public OnPlayerSpawn(playerid) { if(GetPlayerTeam(playerid) == TEAM_TRUCKER) { SetPlayerColor(playerid, COLOR_GREEN); } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(work, 4, cmdtext); dcmd(stopwork, 8, cmdtext); return 0; } dcmd_work(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_TRUCKER) return T_NewJob(playerid); return 1; } dcmd_stopwork(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_TRUCKER) return StopWork(playerid); return 1; } stock T_NewJob(playerid) { new vID = GetPlayerVehicleID(playerid); if(GetVehicleModel(vID)== 403 || GetVehicleModel(vID)== 515 || GetVehicleModel(vID) == 514) { MissionStatus[playerid] = 1; new MisRand = random(sizeof(MisLocations)); new LoadText[128], Float:x, Float:y, Float:z; x = MisLocations[MisRand][LoadX]; y = MisLocations[MisRand][LoadY]; z = MisLocations[MisRand][LoadZ]; unx[playerid] = MisLocations[MisRand][unloadX]; uny[playerid] = MisLocations[MisRand][unloadY]; unz[playerid] = MisLocations[MisRand][unloadZ]; iPay[playerid] = MisLocations[MisRand][Pay]; SetPlayerCheckpoint(playerid, x, y, z, 7); format(LoadText, 128, "%s",MisLocations[MisRand][LoadName]); SendClientMessage(playerid, COLOR_GREEN, "Mission:"); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); SendClientMessage(playerid, COLOR_GREEN, ""); SendClientMessage(playerid, 0xFFFFFFFF, LoadText); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); } else { SendClientMessage(playerid, COLOR_RED, "You must be in a Truck to perform this!"); } return 1; } stock StopWork(playerid) { DisablePlayerCheckpoint(playerid); SendClientMessage(playerid, COLOR_RED, "You chose to cancel the mission and got fined $100"); GivePlayerMoney(playerid, -100); MissionStatus[playerid] = 0; return 1; } public OnPlayerEnterCheckpoint(playerid) { CheckpointEntered(playerid); return 1; } stock CheckpointEntered(playerid) { new gString[128]; if(MissionStatus[playerid] == 1) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, unx[playerid], uny[playerid], unz[playerid], 7); SendClientMessage(playerid, COLOR_ORANGE, "Loaded. Please head to the second checkpoint!"); MissionStatus[playerid] = 2; } else if(MissionStatus[playerid] == 2) { DisablePlayerCheckpoint(playerid); GivePlayerMoney(playerid, iPay[playerid]); SendClientMessage(playerid, COLOR_GREEN, "Well done! You completed the mission!"); format(gString, 512, "%s has completed mission: %s", pName(playerid), iMissionText[playerid]); SendClientMessageToAll(COLOR_GREEN, gString); SetPlayerScore(playerid, GetPlayerScore(playerid)+2); MissionStatus[playerid] = 0; } return 1; } stock pName(PN) { new PX[MAX_PLAYER_NAME]; GetPlayerName(PN, PX, sizeof(PX)); return PX; }[/pawn]
  9. Ideea este ca vreau sa fac din fs-ul asta de trucking un fs de curier!
  10. Sa rezolvat Trebuia sa nu pun Virtual World(am server de trucking)
  11. Cum as putea face sa merg fara trailer doar vehiculul gol: [pawn]#include <a_samp> #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 #define COLOR_ORANGE 0xFFA500FF #define COLOR_LIMEGREEN 0x32CD32FF #define COLOR_ROYALBLUE 0x4169E1FF #define COLOR_SALMON 0xFA8072FF #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_BLUE 0x0000BBAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_RED 0xAA3333AA enum MisLocationsEnum { ID, LoadName[128], Float:LoadX, Float:LoadY, Float:LoadZ, Float:UnloadX, Float:UnloadY, Float:UnloadZ, Pay } new MisLocations[][MisLocationsEnum] = { {0, "Beer from Red County Brewery to Bone County Diner",-24.4073,-281.8898,5.9985,-305.4319,1315.6797,54.6189, 5980}, {1, "Fuel from LV Oil Refinery to LV Dirtring",266.8981,1416.5417,10.2001,1097.5164,1741.7422,10.5474, 5700}, {2, "Vehicle Parts from SF Airport ATC to Wang Cars",-1268.8223,13.6925,14.8682,-1986.3477,253.9728,35.8985, 3000}, {3, "Fuel from SF Oil Refinery to RS Haul",-1016.3634,-688.2434,32.7284,-55.3397,-1138.2479,0.8052, 18770} }; #define TEAM_TRUCKER 1 new iMissionText[512][MAX_PLAYERS], Float:unx[MAX_PLAYERS], Float:uny[MAX_PLAYERS], Float:unz[MAX_PLAYERS], iPay[MAX_PLAYERS], MissionStatus[MAX_PLAYERS]; main(){} public OnGameModeInit() { AddPlayerClass(72, -2105.3228, -124.2982, 37.2531, 0.0, 0,0,0,0,0,0);//Trucker - SF return 1; } public OnPlayerRequestClass(playerid, classid) { switch (classid) { case 0: { GameTextForPlayer(playerid, "Trucker", 3000, 4); SetPlayerTeam(playerid, TEAM_TRUCKER); } } return 1; } public OnPlayerSpawn(playerid) { if(GetPlayerTeam(playerid) == TEAM_TRUCKER) { SetPlayerColor(playerid, COLOR_GREEN); } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(work, 4, cmdtext); dcmd(stopwork, 8, cmdtext); return 0; } dcmd_work(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_TRUCKER) return T_NewJob(playerid); return 1; } dcmd_stopwork(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_TRUCKER) return StopWork(playerid); return 1; } stock T_NewJob(playerid) { new vID = GetPlayerVehicleID(playerid); if(GetVehicleModel(vID)== 403 || GetVehicleModel(vID)== 515 || GetVehicleModel(vID) == 514) { if(IsTrailerAttachedToVehicle(vID)) { MissionStatus[playerid] = 1; new MisRand = random(sizeof(MisLocations)); new LoadText[128], Float:x, Float:y, Float:z; x = MisLocations[MisRand][LoadX]; y = MisLocations[MisRand][LoadY]; z = MisLocations[MisRand][LoadZ]; unx[playerid] = MisLocations[MisRand][unloadX]; uny[playerid] = MisLocations[MisRand][unloadY]; unz[playerid] = MisLocations[MisRand][unloadZ]; iPay[playerid] = MisLocations[MisRand][Pay]; SetPlayerCheckpoint(playerid, x, y, z, 7); format(LoadText, 128, "%s",MisLocations[MisRand][LoadName]); SendClientMessage(playerid, COLOR_GREEN, "Mission:"); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); SendClientMessage(playerid, COLOR_GREEN, ""); SendClientMessage(playerid, 0xFFFFFFFF, LoadText); SendClientMessage(playerid, COLOR_GREEN, "_____________________"); } else { SendClientMessage(playerid, COLOR_RED, "You need a trailer!"); } } else { SendClientMessage(playerid, COLOR_RED, "You must be in a Truck to perform this!"); } return 1; } stock StopWork(playerid) { DisablePlayerCheckpoint(playerid); SendClientMessage(playerid, COLOR_RED, "You chose to cancel the mission and got fined $100"); GivePlayerMoney(playerid, -100); MissionStatus[playerid] = 0; return 1; } public OnPlayerEnterCheckpoint(playerid) { CheckpointEntered(playerid); return 1; } stock CheckpointEntered(playerid) { new gString[128]; new vID = GetPlayerVehicleID(playerid); if(!IsTrailerAttachedToVehicle(vID)) return SendClientMessage(playerid, COLOR_RED, "You need a trailer to unload!"); if(MissionStatus[playerid] == 1) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, unx[playerid], uny[playerid], unz[playerid], 7); SendClientMessage(playerid, COLOR_ORANGE, "Loaded. Please head to the second checkpoint!"); MissionStatus[playerid] = 2; } else if(MissionStatus[playerid] == 2) { DisablePlayerCheckpoint(playerid); GivePlayerMoney(playerid, iPay[playerid]); SendClientMessage(playerid, COLOR_GREEN, "Well done! You completed the mission!"); format(gString, 512, "%s has completed mission: %s", pName(playerid), iMissionText[playerid]); SendClientMessageToAll(COLOR_GREEN, gString); SetPlayerScore(playerid, GetPlayerScore(playerid)+2); MissionStatus[playerid] = 0; } return 1; } stock pName(PN) { new PX[MAX_PLAYER_NAME]; GetPlayerName(PN, PX, sizeof(PX)); return PX; }[/pawn]
  12. De complimat se complima dar nu imi arata pickup-ul
  13. Nu merge imi da: C:\Documents and Settings\SkyNet\Desktop\Pickup.pwn(28) : error 025: function heading differs from prototype C:\Documents and Settings\SkyNet\Desktop\Pickup.pwn(28) : error 029: invalid expression, assumed zero C:\Documents and Settings\SkyNet\Desktop\Pickup.pwn(30) : error 010: invalid function or declaration C:\Documents and Settings\SkyNet\Desktop\Pickup.pwn(32) : error 010: invalid function or declaration C:\Documents and Settings\SkyNet\Desktop\Pickup.pwn(34) : error 010: invalid function or declaration C:\Documents and Settings\SkyNet\Desktop\Pickup.pwn(37) : error 010: invalid function or declaration C:\Documents and Settings\SkyNet\Desktop\Pickup.pwn(39) : error 010: invalid function or declaration C:\Documents and Settings\SkyNet\Desktop\Pickup.pwn(42) : error 010: invalid function or declaration C:\Documents and Settings\SkyNet\Desktop\Pickup.pwn(46) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 9 Errors.
  14. Pinki95

    Problema

    am avut si eu aceeasi problema si am adaugat si a_players.inc de la 0.3x (add V: 0.3x ---> streamer.inc + a_players.inc)
  15. Daca fs il modific asa: [pawn]// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT new MyPickup; #include <a_samp> #if defined FILTERSCRIPT new dialog1; public OnFilterScriptInit() { print("\n--------------------------------------"); print("_________Filterscript by SkyNet_________"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print("_________Gamemode by SkyNet_________"); print("----------------------------------\n"); } #endif public OnGameModeInit() { MyPickup == CreatePickup(1239, 1, -514.3143, 2551.9082, 53.4141, 181.8650, 0, 0, 0, 0, 0, 0); } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1) { if(response) { if(listitem == 0) { SetPlayerSpecialAction(playerid, 20); return 1; } if(listitem == 1) { SetPlayerSpecialAction(playerid, 21); return 1; } } } return 0; } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == MyPickup) { ShowPlayerDialog(playerid, 1, 2, "dialog1", "1. Bere\n2. Tigari", "Ok!", "N-am bani"); } return 1; }[/pawn] Imi da asta: C:\Documents and Settings\SkyNet\Desktop\Dialog.pwn(38) : warning 213: tag mismatch C:\Documents and Settings\SkyNet\Desktop\Dialog.pwn(38) : warning 202: number of arguments does not match definition C:\Documents and Settings\SkyNet\Desktop\Dialog.pwn(38) : warning 202: number of arguments does not match definition C:\Documents and Settings\SkyNet\Desktop\Dialog.pwn(38) : warning 202: number of arguments does not match definition C:\Documents and Settings\SkyNet\Desktop\Dialog.pwn(38) : warning 202: number of arguments does not match definition C:\Documents and Settings\SkyNet\Desktop\Dialog.pwn(38) : warning 202: number of arguments does not match definition C:\Documents and Settings\SkyNet\Desktop\Dialog.pwn(38) : warning 202: number of arguments does not match definition C:\Documents and Settings\SkyNet\Desktop\Dialog.pwn(38) : warning 215: expression has no effect C:\Documents and Settings\SkyNet\Desktop\Dialog.pwn(68) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 9 Warnings.
  16. Imi da aceste erori: C:\Documents and Settings\SkyNet\Desktop\Dialog.pwn(38) : error 017: undefined symbol "MyPickup" C:\Documents and Settings\SkyNet\Desktop\Dialog.pwn(38) : warning 215: expression has no effect C:\Documents and Settings\SkyNet\Desktop\Dialog.pwn(64) : error 017: undefined symbol "MyPickup" C:\Documents and Settings\SkyNet\Desktop\Dialog.pwn(68) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. La acest FS(vreau ca atunci cand intra in pickup sa ii apara dialogul): [pawn]// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include <a_samp> #if defined FILTERSCRIPT new MyPickup; new dialog1; public OnFilterScriptInit() { print("\n--------------------------------------"); print("_________Filterscript by SkyNet_________"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print("_________Gamemode by SkyNet_________"); print("----------------------------------\n"); } #endif public OnGameModeInit() { MyPickup == CreatePickup(1239, 1, -514.3143, 2551.9082, 53.4141, 181.8650, 0, 0, 0, 0, 0, 0); } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1) { if(response) { if(listitem == 0) { SetPlayerSpecialAction(playerid, 20); return 1; } if(listitem == 1) { SetPlayerSpecialAction(playerid, 21); return 1; } } } return 0; } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == MyPickup) { ShowPlayerDialog(playerid, 1, 2, "dialog1", "1. Bere\n2. Tigari", "Ok!", "N-am bani"); } return 1; }[/pawn]
  17. Rezolvat: Includele erau pe 0.3e am uitat sa le schimb pe 0.3x (streamer.inc)
  18. Nu am gresit pt ca aceste porti le-am pus pe un alt server si merge numai pe asta nu merge
  19. Nu a mers. In GameModeInit.inc am portile: [pawn]GameModeInit_Toll() { // Add toll-houses to the world CreateObject(9623, 1787.00, 695.50, 17.40, -3.5, 0.0, 350.25); //object(toll_sfw) (1) // Add a toll-gate to the world AddTollGate(3578, -2668.25, 1274.50, 50.0, -2668.25, 1274.50, 55.0, 0.0, 0.0, 0.0, 300); AddTollGate(3578, -2677.75, 1274.50, 50.0, -2677.75, 1274.50, 55.0, 0.0, 0.0, 0.0, 300); AddTollGate(3578, -2686.25, 1274.50, 50.0, -2686.25, 1274.50, 55.0, 0.0, 0.0, 0.0, 300); AddTollGate(3578, -2694.75, 1274.50, 50.0, -2694.75, 1274.50, 55.0, 0.0, 0.0, 0.0, 300); AddTollGate(980, -1955.59998, -1343.5, 47.8, -1955.59998, -1343.5, 42.4, 0.0, 0.0, 226, 300); AddTollGate(980, -1912, -1363.40002, 47.6, -1912, -1363.40002, 42.2, 0.0, 0.0, 152, 300); AddTollGate(980, -1819.40002, -595.20001, 23.5, -1819.40002, -595.20001, 18, 0.0, 0.0, 182, 300); AddTollGate(980, -1763, -595, 23.5, -1763, -595, 17.7, 0.0, 0.0, 182, 300); AddTollGate(980, 71.5, -1542.19995, 12, 71.5, -1542.19995, 6.5, 0.0, 0.0, 266, 300); AddTollGate(980, 73.9, -1525.80005, 11.8, 73.9, -1525.80005, 6.5, 0.0, 0.0, 266, 300); AddTollGate(980, -22.2, -1340.5, 18.2, -22.2, -1340.5, 12.8, 0.0, 0.0, 310, 300); AddTollGate(980, -6.4, -1364, 18.4, -6.4, -1364, 12.4, 0.0, 0.0, 310, 300); AddTollGate(980, 1769.90002, 664, 25, 1769.90002, 664, 19.2, 0.0, 0.0, 347.985, 300); AddTollGate(980, 1789, 659.79999, 25, 1789, 659.79999, 19.2, 0.0, 0.0, 347.985, 300); AddTollGate(980, 428.20001, 604.09998, 26.3, 428.20001, 604.09998, 20.7, 0.0, 0.0, 35.98, 300); AddTollGate(980, -138, 481.5, 19, -138, 481.5, 13.2, 0.0, 0.0, 345.98, 300); AddTollGate(980, -1130.5, 1099, 45.4, -1130.5, 1099, 39.8, 0.0, 0.0, 317.97, 300); AddTollGate(980, -1141.40002, 1110.19995, 45.6, -1141.40002, 1110.19995, 39.8, 0.0, 0.0, 317.97, 300); AddTollGate(980, 3437.8999, -1814, 17.3, 3437.8999, -1814, 12.3, 0.0, 0.0, 180, 300); } // This function is used to add toll-gates to the map AddTollGate(GateModel, Float:OX, Float:OY, Float:OZ, Float:CX, Float:CY, Float:CZ, Float:RX, Float:RY, Float:RZ, TollMoney) { // Loop through all tollgates for (new TollGate; TollGate < MAX_TOLLGATES; TollGate++) { // Check if this is an empty entry if (ATollGates[TollGate][GateID] == 0) { // Create a new object for the toll-gate in it's closed status ATollGates[TollGate][GateID] = CreateObject(GateModel, CX, CY, CZ, RX, RY, RZ); // Set data ATollGates[TollGate][TollPrice] = TollMoney; // Set the price to pay for passing the toll-gate ATollGates[TollGate][GateStatus] = 0; // Set the status to CLOSED ATollGates[TollGate][OpenX] = OX; // Save the OpenX coordinates ATollGates[TollGate][OpenY] = OY; // Save the OpenY coordinates ATollGates[TollGate][OpenZ] = OZ; // Save the OpenZ coordinates ATollGates[TollGate][CloseX] = CX; // Save the CloseX coordinates ATollGates[TollGate][CloseY] = CY; // Save the CloseY coordinates ATollGates[TollGate][CloseZ] = CZ; // Save the CloseZ coordinates break; // Stop the for-loop } } }[/pawn]
  20. Aici includele PPC_toll.inc [pawn]// This file holds all functions for the toll-system forward Toll(); public Toll() { // Loop through all players for(new playerid; playerid < MAX_PLAYERS; playerid++) { // If the player isn't connected, skip to the next player if(APlayerData[playerid][LoggedIn] == false) continue; // Check if the player is the driver of a vehicle if (GetPlayerVehicleSeat(playerid) == 0) { // Loop through all toll-gates for (new TollGate; TollGate < MAX_TOLLGATES; TollGate++) { // Check if this toll-gate exists if (ATollGates[TollGate][GateID] != 0) { // Check if the player is in range of the tollgate if(IsPlayerInRangeOfPoint(playerid, 7.5, ATollGates[TollGate][CloseX], ATollGates[TollGate][CloseY], ATollGates[TollGate][CloseZ])) { // Check if the toll-gate is closed if(ATollGates[TollGate][GateStatus] == 0) { // Open the gate MoveObject(ATollGates[TollGate][GateID], ATollGates[TollGate][OpenX], ATollGates[TollGate][OpenY], ATollGates[TollGate][OpenZ], 3.0); // Set status to OPEN ATollGates[TollGate][GateStatus] = 1; // Let the player pay the toll RewardPlayer(playerid, -ATollGates[TollGate][TollPrice], 0); new string[50]; format(string, sizeof(string), TXT_PlayerPaysToll, ATollGates[TollGate][TollPrice]); GameTextForPlayer(playerid, string, 3000, 4); // Start a timer that closes the gate after 5 seconds SetTimerEx("CloseGate", 5000, false, "i", TollGate); } } } } } } } forward CloseGate(TollGate); public CloseGate(TollGate) { // Close the gate MoveObject(ATollGates[TollGate][GateID], ATollGates[TollGate][CloseX], ATollGates[TollGate][CloseY], ATollGates[TollGate][CloseZ], 3.0); // Set status to CLOSED ATollGates[TollGate][GateStatus] = 0; } [/pawn]
  21. Am o un server ppc_trucking6 si am adaugat niste tool-gates iar cand te apropii de ele se deschid in sus si se invurtesc cateva grade si asa raman din includele PPC_Toll.inc este ok, nare probleme Ma puteti ajuta?
  22. Cum as putea face cand se deconecteaza un player sa i se salveze pozitia in care a fost ultima data, iar cand sa se conecteze sa il dea de unde a ramas ultima data?
  23. Pinki95

    3 Warning

    Cum rezolv asta: C:\Documents and Settings\SkyNet\Desktop\SRV\gamemodes\lvrcr.pwn(36) : warning 201: redefinition of constant/macro (symbol "MAX_PICKUPS") C:\Documents and Settings\SkyNet\Desktop\SRV\gamemodes\lvrcr.pwn(5306) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg") Linia 36: [pawn]#define MAX_PICKUPS 150[/pawn] Linia 5306: [pawn]public OnPlayerPrivmsg(playerid, recieverid, text[])[/pawn]
  24. [pawn] new file[100], Name[24];[/pawn]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.