Pinki95
Membru-
Posts
130 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
News
Documentation
Everything posted by Pinki95
-
Eu unul cred ca este de la include-ul BUD.
-
OMG :facepalm: Ne crezi n00bi? You are f***ing kidding me ? Clar..comanda din SF*. Huaa..plagiatorilor. Macar pune-l pe FLoRyN si pe Mirya la credits :*
-
OMG =]] Chiar exista astfel de oameni
-
scrie "public" cu litere mici
-
Ma refeream la o comanda facuta dar am rezolvat eu si am facut mai multe comenzi! Acest fs insa are o mica problema nu se salveaza banii si scorul: [pawn]#include <a_samp> #include <dini> #include <dudb> #include <sscanf2> #include <zcmd> #include <SII> #pragma unused ret_memcpy #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_ORANGE 0xFF9900AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFFF enum pInfo { pAdminLevel, pVipLevel, pCash, pScore, } new PlayerInfo[MAX_PLAYERS][pInfo]; new gPlayerLogged[MAX_PLAYERS]; #define SERVER_USER_FILE "DATABASE/%s.ini" public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerConnect(playerid) { gPlayerLogged[playerid] = 0; new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if (!dini_Exists(file)) { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Hi your not registered", "Welcome, your not registered mate, input your registration pw below", "Register", "Leave"); } if(fexist(file)) { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "Fucken awesome mate, your registered . Inpute your pw below", "Login", "Leave"); } return 1; } public OnPlayerDisconnect(playerid, reason) { new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(gPlayerLogged[playerid] == 1) { dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]); dini_IntSet(file, "Money", PlayerInfo[playerid][pCash]); dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]); dini_IntSet(file, "VipLevel",PlayerInfo[playerid][pVipLevel]); } gPlayerLogged[playerid] = 0; return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if (dialogid == 1) { new name[MAX_PLAYER_NAME], file[256], string[128]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(!response) return Kick(playerid); if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Hi your not registered", "Welcome, your not registered mate, input your registration pw below", "Register", "Leave"); dini_Create(file); dini_IntSet(file, "Password", udb_hash(inputtext)); dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0); dini_IntSet(file, "VipLevel",PlayerInfo[playerid][pVipLevel] = 0); dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 0); dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0); format(string, 128, "[sYSTEM]: You succesfully registered the nickname %s with password %s, you have been auto logged in.", name, inputtext); SendClientMessage(playerid, COLOR_YELLOW, string); gPlayerLogged[playerid] = 1; } if (dialogid == 2) { new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(!response) return Kick(playerid); if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "Fucken awesome mate, your registered . Inpute your pw below", "Login", "Leave"); new tmp; tmp = dini_Int(file, "Password"); if(udb_hash(inputtext) != tmp) { SendClientMessage(playerid, COLOR_RED, "Wrong PW sir."); ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "Fucken awesome mate, your registered . Inpute your pw below", "Login", "Leave"); } else { gPlayerLogged[playerid] = 1; PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel"); PlayerInfo[playerid][pVipLevel] = dini_Int(file, "VipLevel"); SetPlayerScore(playerid, PlayerInfo[playerid][pScore]); GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid)); SendClientMessage(playerid,COLOR_RED, "[sYSTEM]: Successfully logged in!"); } } return 1; } CMD:bani(playerid,params[]) { if(PlayerInfo[playerid][pAdminLevel] < 2) return SendClientMessage(playerid,-4,"Ai nevoie de Level 3 pentru a folosi aceasta comanda!");//Checking if the player has level 3, if not it sends him a message. GivePlayerMoney(playerid, 12500); return 1; } CMD:score(playerid,params[]) { if(PlayerInfo[playerid][pAdminLevel] < 1) return SendClientMessage(playerid,-1,"You need Level 1"); SetPlayerScore(playerid, 150); return 1; } CMD:arme(playerid,params[]) { if(PlayerInfo[playerid][pAdminLevel] < 3) return SendClientMessage(playerid,-2,"You need Level 3"); GivePlayerWeapon(playerid, 29, 1000); GivePlayerWeapon(playerid, 31, 1500); GivePlayerWeapon(playerid, 38, 2000); return 1; } CMD:health(playerid,params[]) { if(PlayerInfo[playerid][pAdminLevel] < 4) return SendClientMessage(playerid,-3,"You need Level 4"); SetPlayerHealth(playerid, 100); return 1; } CMD:armour(playerid,params[]) { if(PlayerInfo[playerid][pAdminLevel] < 5) return SendClientMessage(playerid,-5,"You need Level 5"); SetPlayerArmour(playerid, 100); return 1; } CMD:fun(playerid,params[]) { if(PlayerInfo[playerid][pVipLevel] < 5) return SendClientMessage(playerid,-5,"You need Vip Level 5"); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); GivePlayerWeapon(playerid, 29, 2500); GivePlayerWeapon(playerid, 31, 3000); GivePlayerWeapon(playerid, 24, 200); GivePlayerWeapon(playerid, 36, 150); return 1; } CMD:setlevel(playerid,params[]) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-4,"Doar Adminii RCON pot folosii comanda [/setlevel]!");//Checking if the player is rcon admin to set an admin level new id, level;//Creating the id variable to store the selected id and a level variable for the chosen admin level. if(sscanf(params,"ui",id,level)) return SendClientMessage(playerid,-1,"USAGE: /setlevel <id> <level>");//Check if the player inputted a username or id and a admin level. if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-4,"That player is not connected!");//Checking if the selected user is connected or not. new file[64],PlayerName[24];//Creating a variable to store the file path, and a variable to store the players name. GetPlayerName(id,PlayerName,sizeof PlayerName);//Retrieving the selected id's name, format(file,sizeof file,"DATABASE/%s.ini",PlayerName); if(!fexist(file)) return SendClientMessage(playerid,-4,"That player is not registered");//Checking if the player is not registered INI_Open(file);//Opening the file with SII include INI_WriteInt("Level",level);//Writing the line "Level" the selected admin level. INI_Save();//Saving the file INI_Close();//Closing the file PlayerInfo[id][pAdminLevel] = level; SendClientMessage(playerid,-1,"You have changed the selected user's admin level"); SendClientMessage(id,-1,"Your admin level has been changed"); return 1; } CMD:setvip(playerid,params[]) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-4,"Doar Adminii RCON pot folosii comanda [/setlevel]!");//Checking if the player is rcon admin to set an admin level new id, level;//Creating the id variable to store the selected id and a level variable for the chosen admin level. if(sscanf(params,"ui",id,level)) return SendClientMessage(playerid,-1,"USAGE: /setlevel <id> <level>");//Check if the player inputted a username or id and a admin level. if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-4,"That player is not connected!");//Checking if the selected user is connected or not. new file[64],PlayerName[24];//Creating a variable to store the file path, and a variable to store the players name. GetPlayerName(id,PlayerName,sizeof PlayerName);//Retrieving the selected id's name, format(file,sizeof file,"DATABASE/%s.ini",PlayerName); if(!fexist(file)) return SendClientMessage(playerid,-4,"That player is not registered");//Checking if the player is not registered INI_Open(file);//Opening the file with SII include INI_WriteInt("Level",level);//Writing the line "Level" the selected admin level. INI_Save();//Saving the file INI_Close();//Closing the file PlayerInfo[id][pVipLevel] = level; SendClientMessage(playerid,-1,"You have changed the selected user's admin level"); SendClientMessage(id,-1,"Your admin level has been changed"); return 1; }[/pawn]
-
Cum as pute face ca acest fs sa fie pe ZCMD adica comenzile sa fie pe zcmd(vreau doar un exemplu de comanda pe zcmd pusa in acest fs): [pawn]#include <a_samp> #include <dini> #include <dudb> #include <sscanf2> #pragma unused ret_memcpy #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_ORANGE 0xFF9900AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFFF enum pInfo { pAdminLevel, pVipLevel, pCash, pScore, } new PlayerInfo[MAX_PLAYERS][pInfo]; new gPlayerLogged[MAX_PLAYERS]; #define SERVER_USER_FILE "DATABASE/%s.ini" public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerConnect(playerid) { gPlayerLogged[playerid] = 0; new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if (!dini_Exists(file)) { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Hi your not registered", "Welcome, your not registered mate, input your registration pw below", "Register", "Leave"); } if(fexist(file)) { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "Fucken awesome mate, your registered . Inpute your pw below", "Login", "Leave"); } return 1; } public OnPlayerDisconnect(playerid, reason) { new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(gPlayerLogged[playerid] == 1) { dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]); dini_IntSet(file, "Money", PlayerInfo[playerid][pCash]); dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]); dini_IntSet(file, "VipLevel",PlayerInfo[playerid][pVipLevel]); } gPlayerLogged[playerid] = 0; return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if (dialogid == 1) { new name[MAX_PLAYER_NAME], file[256], string[128]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(!response) return Kick(playerid); if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Hi your not registered", "Welcome, your not registered mate, input your registration pw below", "Register", "Leave"); dini_Create(file); dini_IntSet(file, "Password", udb_hash(inputtext)); dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0); dini_IntSet(file, "VipLevel",PlayerInfo[playerid][pVipLevel] = 0); dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 500); dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0); format(string, 128, "[sYSTEM]: You succesfully registered the nickname %s with password %s, you have been auto logged in.", name, inputtext); SendClientMessage(playerid, COLOR_YELLOW, string); gPlayerLogged[playerid] = 1; } if (dialogid == 2) { new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(!response) return Kick(playerid); if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "Fucken awesome mate, your registered . Inpute your pw below", "Login", "Leave"); new tmp; tmp = dini_Int(file, "Password"); if(udb_hash(inputtext) != tmp) { SendClientMessage(playerid, COLOR_RED, "Wrong PW sir."); ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "Fucken awesome mate, your registered . Inpute your pw below", "Login", "Leave"); } else { gPlayerLogged[playerid] = 1; PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel"); PlayerInfo[playerid][pVipLevel] = dini_Int(file, "VipLevel"); SetPlayerScore(playerid, PlayerInfo[playerid][pScore]); GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid)); SendClientMessage(playerid,COLOR_RED, "[sYSTEM]: Successfully logged in!"); } } return 1; } [/pawn]
-
Am detectat problema cu banii(Server: PPC_Trucking): daca fac un payday de ex trebuie modificat in loc de GivePlayerMoney sa fie RewardPlayer(playerid, banii, scorul); EX: RewardPlayer(playerid, 5000, 10); si payday-ul trebuie bagat ing gm, iar eu vreau sa bag fs-ul de mai jos in gm si nu stiu cum [pawn]//////////////////////////////////////////////////////////// /////////////// DRIFT POINTS COUNTER BY LUBY /////////////// /////////////// A little editted by Abhinav //////////////// //////////////////////////////////////////////////////////// #include <a_samp> // by I dont know .. lol #define DRIFT_MINKAT 10.0 // by Luby #define DRIFT_MAXKAT 90.0 // by Luby #define DRIFT_SPEED 30.0 // by Luby //////////// Added by Abhinav/////// #define COLOR_Label 0xFFFFFFFF #define COLOR_LabelOut 0x00000040 #define COLOR_ValueOut 0xFFFFFF40 #define COLOR_Value 0x000000FF #define Label_X 500 #define Value_X 500 #define TD_Y 100 ///////////////////////////////////// new DriftTimer[MAX_PLAYERS]; // Added by Abhinav new TimerA,TimerB,TimerC; // Added by Abhinav new DriftPointsNow[MAX_PLAYERS]; // by Luby new PlayerDriftCancellation[MAX_PLAYERS]; // by Luby new Float:ppos[MAX_PLAYERS][3]; // by Luby enum Float:Pos{ Float:sX,Float:sY,Float:sZ }; // by Luby new Float:SavedPos[MAX_PLAYERS][Pos]; // by Luby new bool:DriftMode[MAX_PLAYERS]=false; // Added by Abhinav new DriftBonus[MAX_PLAYERS]=1; // Added by Abhinav new Float:HealthInit[MAX_PLAYERS]=1000.0; // Added by Abhinav new bool:AutoFixBool[MAX_PLAYERS]=true; // Added by Abhinav new Text:TDLabels[3]; // Added by Abhinav new Text:TDValueDrift[MAX_PLAYERS]; // Added by Abhinav new Text:TDValueBonus[MAX_PLAYERS]; // Added by Abhinav new Text:TDValueCash[MAX_PLAYERS]; // Added by Abhinav forward Drift(); // by Luby forward AngleUpdate(); // by Luby forward DriftExit(playerid); // by Luby forward CheckPlayerState(); // Added by Abhinav forward AutoFix(); // Added by Abhinav public OnFilterScriptInit(){ TimerA=SetTimer("AngleUpdate", 200, true); // by Luby TimerB=SetTimer("AutoFix", 500, true); //by Abhinav TimerC=SetTimer("CheckPlayerState", 100, true); //by Abhinav LoadTextDraws(); return 1; } public OnFilterScriptExit(){ KillTimer(TimerA); KillTimer(TimerB); KillTimer(TimerC); return 1; } Float:GetPlayerTheoreticAngle(i) // By Luby { new Float:sin; new Float:dis; new Float:angle2; new Float:x,Float:y,Float:z; new Float:tmp3; new Float:tmp4; new Float:MindAngle; if(IsPlayerConnected(i)){ GetPlayerPos(i,x,y,z); dis = floatsqroot(floatpower(floatabs(floatsub(x,ppos[0])),2)+floatpower(floatabs(floatsub(y,ppos[1])),2)); if(IsPlayerInAnyVehicle(i)){GetVehicleZAngle(GetPlayerVehicleID(i), angle2);}else{GetPlayerFacingAngle(i, angle2);} if(x>ppos[0]){tmp3=x-ppos[0];}else{tmp3=ppos[0]-x;} if(y>ppos[1]){tmp4=y-ppos[1];}else{tmp4=ppos[1]-y;} if(ppos[1]>y && ppos[0]>x){ sin = asin(tmp3/dis); MindAngle = floatsub(floatsub(floatadd(sin, 90), floatmul(sin, 2)), -90.0); } if(ppos[1]<y && ppos[0]>x){ sin = asin(tmp3/dis); MindAngle = floatsub(floatadd(sin, 180), 180.0); } if(ppos[1]<y && ppos[0]<x){ sin = acos(tmp4/dis); MindAngle = floatsub(floatadd(sin, 360), floatmul(sin, 2)); } if(ppos[1]>y && ppos[0]<x){ sin = asin(tmp3/dis); MindAngle = floatadd(sin, 180); } } if(MindAngle == 0.0){return angle2;}else{return MindAngle;} } public DriftExit(playerid){ // By Luby PlayerDriftCancellation[playerid] = 0; ////////////////// by Abhinav /////////////////// new Float:h; GetVehicleHealth(GetPlayerVehicleID(playerid),h); if(DriftPointsNow[playerid]>70 && DriftPointsNow[playerid]<10000 && h==HealthInit[playerid]) GivePlayerMoney(playerid,DriftPointsNow[playerid]*DriftBonus[playerid]); TextDrawHideForPlayer(playerid,TDLabels[0]); TextDrawHideForPlayer(playerid,TDLabels[1]); TextDrawHideForPlayer(playerid,TDLabels[2]); TextDrawHideForPlayer(playerid,TDValueDrift[playerid]); TextDrawHideForPlayer(playerid,TDValueBonus[playerid]); TextDrawHideForPlayer(playerid,TDValueCash[playerid]); DriftBonus[playerid]=1; AutoFixBool[playerid]=true; SetVehicleHealth(GetPlayerVehicleID(playerid),HealthInit[playerid]); //////////////////////////////////////////////////// DriftPointsNow[playerid] = 0; } Float:ReturnPlayerAngle(playerid){ // By Luby new Float:Ang; if(IsPlayerInAnyVehicle(playerid))GetVehicleZAngle(GetPlayerVehicleID(playerid), Ang); else GetPlayerFacingAngle(playerid, Ang); return Ang; } public Drift(){ // By Luby new Float:Angle1, Float:Angle2, Float:BySpeed; new Float:Z; new Float:X; new Float:Y; new Float:SpeedX; for(new g=0;g<200;g++){ GetPlayerPos(g, X, Y, Z); SpeedX = floatsqroot(floatadd(floatadd(floatpower(floatabs(floatsub(X,SavedPos[ g ][ sX ])),2),floatpower(floatabs(floatsub(Y,SavedPos[ g ][ sY ])),2)),floatpower(floatabs(floatsub(Z,SavedPos[ g ][ sZ ])),2))); Angle1 = ReturnPlayerAngle(g); Angle2 = GetPlayerTheoreticAngle(g); BySpeed = floatmul(SpeedX, 12); if(IsPlayerInAnyVehicle(g) && GetVType(GetPlayerVehicleID(g)) && floatabs(floatsub(Angle1, Angle2)) > DRIFT_MINKAT && floatabs(floatsub(Angle1, Angle2)) < DRIFT_MAXKAT && BySpeed > DRIFT_SPEED){ if(PlayerDriftCancellation[g] > 0)KillTimer(PlayerDriftCancellation[g]); PlayerDriftCancellation[g] = 0; DriftPointsNow[g] += floatval( floatabs(floatsub(Angle1, Angle2)) * 3 * (BySpeed*0.1) )/10; PlayerDriftCancellation[g] = SetTimerEx("DriftExit", 3000, 0, "d", g); } if(DriftPointsNow[g] > 70 && DriftPointsNow[g]<10000){ ///////////// by Abhinav //////////////////// if(DriftPointsNow[g]<500){ DriftBonus[g]=1; } if(DriftPointsNow[g]>=500 && DriftPointsNow[g]<1000){ DriftBonus[g]=2; } if(DriftPointsNow[g]>=1000 && DriftPointsNow[g]<1700){ DriftBonus[g]=3; } if(DriftPointsNow[g]>=1700 && DriftPointsNow[g]<2500){ DriftBonus[g]=4; } if(DriftPointsNow[g]>=2500){ DriftBonus[g]=5; } TextDrawShowForPlayer(g,TDLabels[0]); TextDrawShowForPlayer(g,TDLabels[1]); TextDrawShowForPlayer(g,TDLabels[2]); TextDrawShowForPlayer(g,TDValueDrift[g]); TextDrawShowForPlayer(g,TDValueBonus[g]); TextDrawShowForPlayer(g,TDValueCash[g]); new DPs[128],DBn[128],Cash[128],csh; valstr(DPs,DriftPointsNow[g],false); format(DBn,sizeof(DBn),"X%i",DriftBonus[g]); csh=DriftPointsNow[g]*DriftBonus[g]; format(Cash,sizeof(Cash),"$%i",csh); TextDrawSetString(TDValueDrift[g],DPs); TextDrawSetString(TDValueBonus[g],DBn); TextDrawSetString(TDValueCash[g],Cash); //////////////////////////////////////// } SavedPos[ g ][ sX ] = X; SavedPos[ g ][ sY ] = Y; SavedPos[ g ][ sZ ] = Z; } } public AngleUpdate(){ // By Luby for(new g=0;g<=MAX_PLAYERS;g++){ new Float:x, Float:y, Float:z; if(IsPlayerInAnyVehicle(g))GetVehiclePos(GetPlayerVehicleID(g), x, y, z); else GetPlayerPos(g, x, y, z); ppos[g][0] = x; ppos[g][1] = y; ppos[g][2] = z; } } floatval(Float:val){ // By Luby new str[256]; format(str, 256, "%.0f", val); return todec(str); } todec(str[]){ // By Luby return strval(str); } LoadTextDraws(){ // by Abhinav TDLabels[0]=TextDrawCreate(Label_X,TD_Y,"Drift Points"); TextDrawColor(TDLabels[0],COLOR_Label); TextDrawSetShadow(TDLabels[0],0); TextDrawSetOutline(TDLabels[0],1); TextDrawLetterSize(TDLabels[0],0.5,2); TextDrawBackgroundColor(TDLabels[0],COLOR_LabelOut); TextDrawFont(TDLabels[0],1); TDLabels[1]=TextDrawCreate(Label_X,TD_Y+50,"Drift Bonus"); TextDrawColor(TDLabels[1],COLOR_Label); TextDrawSetShadow(TDLabels[1],0); TextDrawSetOutline(TDLabels[1],1); TextDrawLetterSize(TDLabels[1],0.5,2); TextDrawBackgroundColor(TDLabels[1],COLOR_LabelOut); TextDrawFont(TDLabels[1],1); TDLabels[2]=TextDrawCreate(Label_X,TD_Y+100,"Drift Cash"); TextDrawColor(TDLabels[2],COLOR_Label); TextDrawSetShadow(TDLabels[2],0); TextDrawSetOutline(TDLabels[2],1); TextDrawLetterSize(TDLabels[2],0.5,2); TextDrawBackgroundColor(TDLabels[2],COLOR_LabelOut); TextDrawFont(TDLabels[2],1); new i; for(i=0;i<=MAX_PLAYERS;i++){ TDValueDrift=TextDrawCreate(Value_X,TD_Y+20,"0"); TextDrawColor(TDValueDrift,COLOR_Value); TextDrawSetShadow(TDValueDrift,0); TextDrawSetOutline(TDValueDrift,1); TextDrawLetterSize(TDValueDrift,0.5,2); TextDrawBackgroundColor(TDValueDrift,COLOR_ValueOut); TextDrawFont(TDValueDrift,3); TDValueBonus=TextDrawCreate(Value_X,TD_Y+70,"X1"); TextDrawColor(TDValueBonus,COLOR_Value); TextDrawSetShadow(TDValueBonus,0); TextDrawSetOutline(TDValueBonus,1); TextDrawLetterSize(TDValueBonus,0.5,2); TextDrawBackgroundColor(TDValueBonus,COLOR_ValueOut); TextDrawFont(TDValueBonus,3); TDValueCash=TextDrawCreate(Value_X,TD_Y+120,"$0"); TextDrawColor(TDValueCash,COLOR_Value); TextDrawSetShadow(TDValueCash,0); TextDrawSetOutline(TDValueCash,1); TextDrawLetterSize(TDValueCash,0.5,2); TextDrawBackgroundColor(TDValueCash,COLOR_ValueOut); TextDrawFont(TDValueCash,3); } return 1; } public CheckPlayerState(){ //by Abhinav new i,cs; for(i=0;i<=MAX_PLAYERS;i++){ cs=GetPlayerState(i); if(DriftMode && cs==PLAYER_STATE_DRIVER && DriftPointsNow>70){ new Float:h; GetVehicleHealth(GetPlayerVehicleID(i),h); if(h<HealthInit){ KillTimer(DriftTimer); DriftExit(i); GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~r~Boom",800,5); DriftMode=false; } } if(cs==PLAYER_STATE_DRIVER && DriftMode==false){ if(GetVType(GetPlayerVehicleID(i))){ DriftMode=true; GetVehicleHealth(GetPlayerVehicleID(i),HealthInit); AutoFixBool=false; DriftTimer=SetTimerEx("Drift", 200, true, "i", i); } } else if(cs!=PLAYER_STATE_DRIVER && DriftMode==true){ KillTimer(DriftTimer); DriftMode=false; AutoFixBool=true; } else{} } return 1; } public AutoFix(){ // By abhinav new i; for(i=0;i<=MAX_PLAYERS;i++){ if(AutoFixBool && IsPlayerInAnyVehicle(i)){ SetVehicleHealth(GetPlayerVehicleID(i),HealthInit); } } } GetVType(vid){ // By Abhinav new Convertibles[4]={480, 533, 439, 555}; new Industrial[26]={499, 422, 482, 498, 609, 524, 578, 455, 403, 414, 582, 443, 514, 413, 515, 440, 543, 605, 459, 531, 408, 552, 478, 456, 554}; new LowRider[8]={536, 575, 534, 567, 535, 566, 576, 412}; new OffRoad[13]={568, 424, 573, 579, 400, 500, 444, 556, 557, 470, 489, 505, 595}; new Service[19]={416, 433, 431, 438, 437, 523, 427, 490, 528, 407, 544, 596, 596, 597, 598, 599, 432, 601, 420}; new Saloon[35]={445, 504, 401, 518, 527, 542, 507, 562, 585, 419, 526, 604, 466, 492, 474, 546, 517, 410, 551, 516, 467, 600, 426, 436, 547, 405, 580, 560, 550, 549, 540, 491, 529, 421}; new Sports[20]={602, 429, 496, 402, 541, 415, 589, 587, 565, 494, 502, 503, 411, 559, 603, 475, 506, 451, 558, 477}; new Wagons[5]={418, 404, 479, 458, 561}; new modelid=GetVehicleModel(vid); new i; for(i=0;i<3;i++){ if(Convertibles==modelid) return 1; } for(i=0;i<25;i++){ if(Industrial==modelid) return 1; } for(i=0;i<7;i++){ if(LowRider==modelid) return 1; } for(i=0;i<12;i++){ if(OffRoad==modelid) return 1; } for(i=0;i<19;i++){ if(Service==modelid) return 1; } for(i=0;i<35;i++){ if(Saloon==modelid) return 1; } for(i=0;i<20;i++){ if(Sports==modelid) return 1; } for(i=0;i<5;i++){ if(Wagons==modelid) return 1; } return 0; }[/pawn]
-
Cum as putea adauga un timer ca atunci cand intra in primul checkpoint sa stea 5 secunde si in alea 5 secunde sa ii apara o bara care se incarca ca si aici: http://imageshack.us/a/img850/4199/pluk.png ,iar dupa ce au trecut 5 secunde sa ii apara urmatorul checkpoint. GM: [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 BusLocationsEnum { ID, LoadName[128], Float:LoadX, Float:LoadY, Float:LoadZ, Float:UnloadX, Float:UnloadY, Float:UnloadZ, Pay } enum PilotLocationsEnum { ID, LoadName[128], Float:LoadX, Float:LoadY, Float:LoadZ, Float:UnloadX, Float:UnloadY, Float:UnloadZ, Pay } new BusLocations[][busLocationsEnum] = { {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} }; new PilotLocations[][PilotLocationsEnum] = { {0, "Beer from Red County Brewery to Bone County Diner",-1268.8223,13.6925,14.8682,-1268.8223,13.6925,14.8682, 5980}, {1, "Fuel from LV Oil Refinery to LV Dirtring",-1268.8223,13.6925,14.8682,-1268.8223,13.6925,14.8682, 5700}, {2, "Vehicle Parts from SF Airport ATC to Wang Cars",-1268.8223,13.6925,14.8682,-1268.8223,13.6925,14.8682, 3000}, {3, "Fuel from SF Oil Refinery to RS Haul",-1268.8223,13.6925,14.8682,-1268.8223,13.6925,14.8682, 18770} }; #define TEAM_AUTOBUS 1 #define TEAM_PILOT 2 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, -1226.5083, 55.1571, 14.1324, 244.1263, 0, 0, 0, 0, 0, 0); // spawn CreateVehicle(520, -1217.2897, 41.9185, 14.1401, 198.6408, 3, 3, 600); CreateVehicle(431, -2125.7415, -90.8166, 35.3203, 268.5503, 3, 6, 600); // Tir CreateVehicle(437, -2125.7297, -102.2942, 35.3203, 267.3752, 3, 3, 600); // Remorca return 1; } public OnPlayerRequestClass(playerid, classid) { InterpolateCameraPos(playerid,1452.445556,-814.403869,88.533508,1415.500000,-813.963256,90.274688,2222); InterpolateCameraLookAt(playerid,1449.309692,-817.947631,86.918464,1415.342529,-809.165588,91.673728,2222); SetPlayerPos(playerid,1415.590576,-808.479675,91.853370); SetPlayerFacingAngle(playerid,184.728164); switch (classid) { case 0: { GameTextForPlayer(playerid, "~b~Bus Driver", 3000, 4); SetPlayerTeam(playerid, TEAM_AUTOBUS); } case 1: { GameTextForPlayer(playerid, "~r~Pilot", 3000, 4); SetPlayerTeam(playerid, TEAM_PILOT); } } return 1; } public OnPlayerSpawn(playerid) { if(GetPlayerTeam(playerid) == TEAM_AUTOBUS) { SetPlayerColor(playerid, COLOR_LIGHTBLUE); } if(GetPlayerTeam(playerid) == TEAM_PILOT) { SetPlayerColor(playerid, COLOR_YELLOW); } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(work, 4, cmdtext); dcmd(stopwork, 8, cmdtext); dcmd(fun, 3, cmdtext); dcmd(reclass, 7, cmdtext); return 0; } dcmd_work(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_AUTOBUS) return T_NewJob(playerid); if(GetPlayerTeam(playerid) == TEAM_PILOT) return T_NewJobPilot(playerid); return 1; } dcmd_stopwork(playerid, params[]) { #pragma unused params if(GetPlayerTeam(playerid) == TEAM_AUTOBUS) return StopWork(playerid); if(GetPlayerTeam(playerid) == TEAM_PILOT) return StopWork(playerid); return 1; } dcmd_fun(playerid, params[]) { #pragma unused params if(IsPlayerAdmin(playerid)) { GivePlayerWeapon(playerid, 24, 100); GivePlayerWeapon(playerid, 38, 500); GivePlayerWeapon(playerid, 30, 900); GivePlayerWeapon(playerid, 28, 800); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); } return 1; } dcmd_reclass(playerid, params[]) { #pragma unused params ForceClassSelection(playerid); SetPlayerHealth(playerid, 0.0); return 1; } stock T_NewJob(playerid) { new vID = GetPlayerVehicleID(playerid); if(GetVehicleModel(vID)== 431 || GetVehicleModel(vID)== 437) { MissionStatus[playerid] = 1; new BusRand = random(sizeof(BusLocations)); new LoadText[128], Float:x, Float:y, Float:z; x = BusLocations[busRand][LoadX]; y = BusLocations[busRand][LoadY]; z = BusLocations[busRand][LoadZ]; unx[playerid] = BusLocations[busRand][unloadX]; uny[playerid] = BusLocations[busRand][unloadY]; unz[playerid] = BusLocations[busRand][unloadZ]; iPay[playerid] = BusLocations[busRand][Pay]; SetPlayerCheckpoint(playerid, x, y, z, 7); format(LoadText, 128, "%s",BusLocations[busRand][LoadName]); SendClientMessage(playerid, COLOR_GREEN, "Misiune:"); SendClientMessage(playerid, COLOR_GREEN, "_______________________________"); SendClientMessage(playerid, COLOR_GREEN, ""); SendClientMessage(playerid, 0xFFFFFFFF, LoadText); SendClientMessage(playerid, COLOR_GREEN, "_______________________________"); } else { SendClientMessage(playerid, COLOR_RED, "ERROR: Trebuie sa fii intr-un autobus!"); } return 1; } stock T_NewJobPilot(playerid) { new vID = GetPlayerVehicleID(playerid); if(GetVehicleModel(vID)== 520) { MissionStatus[playerid] = 1; new PilotRand = random(sizeof(PilotLocations)); new LoadText[128], Float:x, Float:y, Float:z; x = PilotLocations[PilotRand][LoadX]; y = PilotLocations[PilotRand][LoadY]; z = PilotLocations[PilotRand][LoadZ]; unx[playerid] = PilotLocations[PilotRand][unloadX]; uny[playerid] = PilotLocations[PilotRand][unloadY]; unz[playerid] = PilotLocations[PilotRand][unloadZ]; iPay[playerid] = PilotLocations[PilotRand][Pay]; SetPlayerCheckpoint(playerid, x, y, z, 7); format(LoadText, 128, "%s",PilotLocations[PilotRand][LoadName]); SendClientMessage(playerid, COLOR_GREEN, "Misiune:"); SendClientMessage(playerid, COLOR_GREEN, "_______________________________"); SendClientMessage(playerid, COLOR_GREEN, ""); SendClientMessage(playerid, 0xFFFFFFFF, LoadText); SendClientMessage(playerid, COLOR_GREEN, "_______________________________"); } else { SendClientMessage(playerid, COLOR_RED, "ERROR: Trebuie sa fii intr-un Avion!"); } return 1; } stock StopWork(playerid) { DisablePlayerCheckpoint(playerid); SendClientMessage(playerid, COLOR_RED, "Ai renuntat la misiune si ai pierdut $1000"); GivePlayerMoney(playerid, -1000); 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, "Du-te la Checkpoint-ul rosu pentru a descarca!"); MissionStatus[playerid] = 2; } else if(MissionStatus[playerid] == 2) { DisablePlayerCheckpoint(playerid); GivePlayerMoney(playerid, iPay[playerid]); SendClientMessage(playerid, COLOR_GREEN, "Bravo! Ai terminat misiunea!"); 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]
-
nu, este doar un server PPC_trucking6
-
[pawn]// Bans a player for (days, hours, minutes, seconds) COMMAND:ban(playerid, params[]) { // Setup local variables new PlayerToBan, Days, Hours, Reason[128], TotalBanTime, Msg[128], Name[24], AdminName[24]; // Send the command to all admins so they can see it SendAdminText(playerid, "/ban", params); // Check if the player has logged in if (APlayerData[playerid][LoggedIn] == true) { // Check if the player's admin-level is at least 2 if (APlayerData[playerid][PlayerLevel] >= 2) { if (sscanf(params, "uiis[128]", PlayerToBan, Days, Hours, Reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/ban <PlayerToBan> <Days> <Hours> <Reason>\""); else { if (IsPlayerConnected(PlayerToBan)) { // Get the names of the player and the admin who executed the ban GetPlayerName(playerid, AdminName, sizeof(AdminName)); GetPlayerName(PlayerToBan, Name, sizeof(Name)); // Increase the number of bans APlayerData[PlayerToBan][bans]++; // Calculate the total bantime (when the player can login again) TotalBanTime = (Days * 86400) + (Hours * 3600) + gettime(); // Check if this is the player's 5th ban if (APlayerData[PlayerToBan][bans] == 3) APlayerData[PlayerToBan][banTime] = 2147483640; // Make the ban permanent (as high as it can go) else APlayerData[PlayerToBan][banTime] = TotalBanTime; // Store this value for the player // Inform the player about his ban // Check if this is the player's 5th ban if (APlayerData[PlayerToBan][bans] == 5) { format(Msg, 128, "You have been banned permanently by %s, this was your 3th ban", AdminName); SendClientMessage(PlayerToBan, 0x808080FF, Msg); } else { format(Msg, 128, "You have been temponarlity banned by %s for %i days and %i hours", AdminName, Days, Hours); SendClientMessage(PlayerToBan, 0x808080FF, Msg); format(Msg, 128, "Reason: %s", Reason); SendClientMessage(PlayerToBan, 0x808080FF, Msg); format(Msg, 128, "You've been banned %i times now, 3th time is permament", APlayerData[PlayerToBan][bans]); SendClientMessage(PlayerToBan, 0x808080FF, Msg); } // Kick the player (his data will be saved) Kick(PlayerToBan); // Inform everybody else which player was banned and for how long format(Msg, 128, "%s %s has temponarlity banned %s for %i days and %i hours", AdminLevelName[APlayerData[playerid][PlayerLevel]], AdminName, Name, Days, Hours); SendClientMessageToAll(0x808080FF, Msg); } } } else return 0; } else return 0; return 1; }[/pawn]
-
Am un server de PPC_Trucking si avea un bug faceam drifturi si cand sa imi dea banii de pe drift imi cresteau si scadeau la loc problema am detectato a fost din PPC_Speedometer.inc am facu asa: [pawn] ResetPlayerMoney(playerid); GivePlayerMoney(playerid, APlayerData[playerid][PlayerMoney]); SetPlayerScore(playerid, APlayerData[playerid][PlayerScore]); // Limit the cash that the player can have if (APlayerData[playerid][PlayerMoney] > 999000000) APlayerData[playerid][PlayerMoney] = 999000000; // Limit the cash that the player can have below 0 if (APlayerData[playerid][PlayerMoney] < -1000000) APlayerData[playerid][PlayerMoney] = -1000000;[/pawn] -din asta am modificat asa: [pawn] GivePlayerMoney(playerid, APlayerData[playerid][PlayerMoney]); SetPlayerScore(playerid, APlayerData[playerid][PlayerScore]); // Limit the cash that the player can have if (APlayerData[playerid][PlayerMoney] > 0) APlayerData[playerid][PlayerMoney] = 0; // Limit the cash that the player can have below 0 if (APlayerData[playerid][PlayerMoney] < -0) APlayerData[playerid][PlayerMoney] = -0;[/pawn] Iar acum imi da banii pe drifturi dar nu imi mai salveaza banii cand se deconecteaza playerul respectiv (banii sunt pe 0 la conectare, nu se salveaza)
-
obiectele adaugate alea 0.3c
-
SSCANF.SO A FOST PROBLEMA
-
Deci can vreau sapornesc serverul imi apare asa: [16:10:41] sscanf error: System not initialised. [16:10:41] sscanf error: System not initialised. imi apar cam vreo 50 de dintr-astea ce sa fac?
-
Probabil ai depasit limita obiectelor cu streamer (ai obiecte multe?) sau ai obiecte si cu streamer si cu CreateObject trebuie sa fie toate pe streamer
-
Ma puteti ajuta? Nu ma intereseaza ca unu ii in FS si altu in GM sa stiu doar ca merge!
-
acele linii cu case sunt de doua ori stergele
-
Un exemplu de erroare din asta este: [pawn]#include <a_samp> #include <streamer> #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print("_________Filterscript by SkyNet_________"); print("--------------------------------------\n"); return 1; } #else main() { print("\n----------------------------------"); print("_________Gamemode by SkyNet_________"); print("----------------------------------\n"); } #endif public OnGameModeInit() { AddStaticVehicleEx(411,-2340.0290527,-1629.9129639,483.5029907,340.0000000,3,1,15); //Infernus AddStaticVehicleEx(411,-2335.2609863,-1615.8050537,483.5159912,161.9993286,3,1,15); //Infernus AddStaticVehicleEx(468,-2335.3200684,-1631.1999512,483.4609985,344.0000000,1,1,15); //Sanchez AddStaticVehicleEx(468,-2331.8090820,-1616.7790527,483.4750061,161.9999390,1,1,15); //Sanchez CreateDynamicObject(3494,-2350.0068359,-1611.4667969,486.7030029,0.0000000,0.0000000,341.9934082); //object(luxorpillar04_lvs) (1) CreateDynamicObject(3494,-2344.3349609,-1628.6350098,486.7399902,0.0000000,0.0000000,341.9879150); //object(luxorpillar04_lvs) (2) CreateDynamicObject(2898,-2352.7570801,-1623.9300537,482.6889954,0.0000000,0.0000000,342.0000000); //object(funturf_law) (1) CreateDynamicObject(2898,-2351.0878906,-1618.7829590,482.6740112,0.0000000,0.0000000,341.9989014); //object(funturf_law) (2) CreateDynamicObject(2898,-2349.4208984,-1613.6319580,482.6589966,0.0000000,0.0000000,341.9989014); //object(funturf_law) (3) CreateDynamicObject(2898,-2348.8750000,-1625.2049561,482.6929932,0.0000000,0.0000000,341.9989014); //object(funturf_law) (4) CreateDynamicObject(2898,-2347.2229004,-1620.0500488,482.6770020,0.0000000,0.0000000,341.9989014); //object(funturf_law) (5) CreateDynamicObject(2898,-2345.5332031,-1614.8964844,482.6799927,0.0000000,0.0000000,341.9934082); //object(funturf_law) (6) CreateDynamicObject(2898,-2344.9929199,-1626.4799805,482.6960144,0.0000000,0.0000000,341.9989014); //object(funturf_law) (7) CreateDynamicObject(2898,-2343.3300781,-1621.3320312,482.6979980,0.0000000,0.0000000,341.9934082); //object(funturf_law) (8) CreateDynamicObject(2898,-2341.6579590,-1616.1800537,482.7109985,0.0000000,0.0000000,341.9989014); //object(funturf_law) (9) CreateDynamicObject(3494,-2354.5605469,-1625.3261719,486.7330017,0.0000000,0.0000000,341.9879150); //object(luxorpillar04_lvs) (2) CreateDynamicObject(3494,-2339.9040527,-1614.7810059,486.7550049,0.0000000,0.0000000,341.9824219); //object(luxorpillar04_lvs) (2) CreateDynamicObject(18102,-2342.0100098,-1617.3480225,491.0000000,0.0000000,0.0000000,342.0000000); //object(light_box1) (1) CreateDynamicObject(18102,-2345.6499023,-1630.0200195,491.0000000,0.0000000,0.0000000,341.9963379); //object(light_box1) (2) CreateDynamicObject(3851,-2349.6562500,-1627.7763672,484.7229919,0.0000000,0.0000000,71.9989014); //object(carshowwin_sfsx) (5) CreateDynamicObject(3851,-2349.6562500,-1627.7763672,488.7099915,0.0000000,0.0000000,72.0000000); //object(carshowwin_sfsx) (6) CreateDynamicObject(3851,-2348.9990234,-1625.8879395,490.6000061,0.0000000,90.0000000,72.0000000); //object(carshowwin_sfsx) (7) CreateDynamicObject(3851,-2344.7370605,-1612.2939453,484.7099915,0.0000000,0.0000000,71.9989014); //object(carshowwin_sfsx) (8) CreateDynamicObject(3851,-2344.7363281,-1612.2939453,488.6000061,0.0000000,0.0000000,71.9989014); //object(carshowwin_sfsx) (9) CreateDynamicObject(3851,-2347.7500000,-1622.0999756,490.6000061,0.0000000,90.0000000,71.9989014); //object(carshowwin_sfsx) (11) CreateDynamicObject(3851,-2346.5000000,-1618.3000488,490.6000061,0.0000000,90.0000000,71.9989014); //object(carshowwin_sfsx) (12) CreateDynamicObject(3851,-2345.1999512,-1614.5600586,490.6000061,0.0000000,90.0000000,71.9989014); //object(carshowwin_sfsx) (13) CreateDynamicObject(3851,-2344.7363281,-1612.2939453,488.8999939,0.0000000,0.0000000,71.9989014); //object(carshowwin_sfsx) (14) CreateDynamicObject(14391,-2353.0319824,-1621.5360107,483.6789856,0.0000000,0.0000000,342.0000000); //object(dr_gsnew07) (1) CreateDynamicObject(14391,-2351.0349121,-1615.7280273,483.6489868,0.0000000,0.0000000,341.9989014); //object(dr_gsnew07) (2) CreateDynamicObject(3851,-2352.2529297,-1615.9410400,484.7040100,0.0000000,0.0000000,341.9989014); //object(carshowwin_sfsx) (15) CreateDynamicObject(3851,-2354.0749512,-1621.3000488,488.6000061,0.0000000,0.0000000,341.9934082); //object(carshowwin_sfsx) (16) CreateDynamicObject(3851,-2352.2529297,-1615.9404297,488.6000061,0.0000000,0.0000000,341.9934082); //object(carshowwin_sfsx) (17) CreateDynamicObject(3851,-2354.0742188,-1621.2998047,484.7040100,0.0000000,0.0000000,341.9934082); //object(carshowwin_sfsx) (18) CreateDynamicObject(2232,-2353.9020996,-1625.2719727,487.0000000,0.0000000,0.0000000,102.0000000); //object(med_speaker_4) (1) CreateDynamicObject(2232,-2349.4912109,-1611.8095703,486.9899902,0.0000000,0.0000000,31.9921875); //object(med_speaker_4) (2) CreateDynamicObject(2232,-2340.3120117,-1615.2130127,487.3590088,0.0000000,0.0000000,293.9921875); //object(med_speaker_4) (3) CreateDynamicObject(2232,-2344.5991211,-1628.0849609,487.1130066,0.0000000,0.0000000,37.9886475); //object(med_speaker_4) (4) CreateDynamicObject(2229,-2353.4499512,-1625.3730469,482.7189941,0.0000000,0.0000000,104.0000000); //object(swank_speaker) (1) CreateDynamicObject(2229,-2348.2819824,-1611.8759766,482.6889954,0.0000000,0.0000000,29.9965820); //object(swank_speaker) (2) CreateDynamicObject(2229,-2345.8613281,-1628.3310547,482.7260132,0.0000000,0.0000000,189.9920654); //object(swank_speaker) (3) CreateDynamicObject(2229,-2341.4091797,-1615.0185547,482.7409973,0.0000000,0.0000000,289.9951172); //object(swank_speaker) (4) CreateDynamicObject(3472,-2342.5310059,-1629.1999512,482.6820068,0.0000000,0.0000000,194.0000000); //object(circuslampost03) (1) CreateDynamicObject(3472,-2338.1088867,-1614.9040527,482.7179871,0.0000000,0.0000000,12.0000000); //object(circuslampost03) (2) CreateDynamicObject(9833,-2347.6508789,-1619.7509766,493.8030090,0.0000000,0.0000000,0.0000000); //object(fountain_sfw) (1) CreateDynamicObject(18781,-2279.5302734,-1655.7451172,489.4920044,0.0000000,0.0000000,270.0000000); //object(meshrampbig) (2) CreateDynamicObject(18836,-2255.2719727,-1634.3380127,484.9379883,0.0000000,0.0000000,90.0000000); //object(rbhalfpipe) (1) CreateDynamicObject(18842,-2206.1379395,-1634.3609619,484.9500122,0.0000000,90.0000000,0.0000000); //object(rb50mtube) (1) CreateDynamicObject(18841,-2241.5996094,-1634.3095703,532.5999756,0.0000000,0.0000000,0.0000000); //object(rb50mbend180tube) (2) CreateDynamicObject(18842,-2206.1376953,-1634.3603516,516.7000122,0.0000000,90.0000000,0.0000000); //object(rb50mtube) (2) CreateDynamicObject(18841,-2171.0000000,-1634.5000000,500.8640137,0.0000000,0.0000000,178.9947510); //object(rb50mbend180tube) (3) CreateDynamicObject(18842,-2206.1376953,-1634.3603516,580.2000122,0.0000000,90.0000000,0.0000000); //object(rb50mtube) (3) CreateDynamicObject(18841,-2171.0000000,-1634.5000000,564.2999878,0.0000000,0.0000000,178.9947510); //object(rb50mbend180tube) (4) CreateDynamicObject(18842,-2206.1376953,-1634.3603516,548.5000000,0.0000000,90.0000000,0.0000000); //object(rb50mtube) (4) CreateDynamicObject(18842,-2256.1000977,-1634.3599854,580.2000122,0.0000000,90.0000000,0.0000000); //object(rb50mtube) (5) CreateDynamicObject(18842,-2306.0000000,-1634.3593750,580.2000122,0.0000000,90.0000000,0.0000000); //object(rb50mtube) (6) CreateDynamicObject(18835,-2379.0000000,-1627.4520264,550.3619995,0.0000000,0.0000000,0.0000000); //object(rbfunnel) (1) CreateDynamicObject(18781,-2279.5605469,-1675.3388672,489.4899902,0.0000000,0.0000000,270.0000000); //object(meshrampbig) (3) CreateDynamicObject(19338,-2345.9650879,-1647.0570068,482.7030029,0.0000000,0.0000000,0.0000000); //object(hot_air_balloon07) (1) CreateDynamicObject(19338,-2334.2849121,-1578.1159668,482.5599976,0.0000000,0.0000000,338.0000000); //object(hot_air_balloon07) (2) CreateDynamicObject(18783,-2269.2460938,-1566.6369629,475.9400024,0.0000000,0.0000000,48.0000000); //object(funboxtop1) (1) CreateDynamicObject(18783,-2298.8610840,-1569.6059570,476.0000000,0.0000000,0.0000000,47.9992676); //object(funboxtop1) (3) CreateDynamicObject(18783,-2282.6359863,-1581.4930420,475.9590149,0.0000000,0.0000000,48.0000000); //object(funboxtop1) (4) CreateDynamicObject(18779,-2289.6630859,-1552.0930176,485.0000000,0.0000000,0.0000000,228.0000000); //object(rampt2) (2) CreateDynamicObject(18843,-2277.1230469,-1547.3270264,543.7169800,0.0000000,0.0000000,0.0000000); //object(glasssphere1) (1) CreateDynamicObject(18777,-2133.8779297,-1513.4785156,503.9700012,0.0000000,0.0000000,137.9992676); //object(tunnelspiral1) (1) CreateDynamicObject(18982,-2229.1760254,-1522.1700439,483.0000000,0.0000000,0.0000000,318.0000000); //object(tube100m3) (1) CreateDynamicObject(18783,-2189.5549316,-1477.3000488,475.5000000,0.0000000,0.0000000,47.9992676); //object(funboxtop1) (5) CreateDynamicObject(18800,-2146.3491211,-1462.6660156,488.8999939,0.0000000,0.0000000,48.0000000); //object(mroadhelix1) (2) CreateDynamicObject(18985,-2182.1474609,-1537.2519531,532.0000000,0.0000000,0.0000000,317.9992676); //object(tube100m6) (1) CreateDynamicObject(1634,-2215.6130371,-1574.3969727,527.8060303,0.0000000,0.0000000,140.0000000); //object(landjump2) (1) CreateDynamicObject(18780,-2256.6000977,-1608.1519775,492.3099976,0.0000000,0.0000000,24.0000000); //object(rampt3) (1) CreateDynamicObject(18780,-2260.0700684,-1599.7540283,492.1000061,0.0000000,0.0000000,23.9996338); //object(rampt3) (2) CreateDynamicObject(3472,-2337.0371094,-1630.7860107,482.7009888,0.0000000,0.0000000,193.9965820); //object(circuslampost03) (4) CreateDynamicObject(3472,-2332.6169434,-1616.6839600,482.7149963,0.0000000,0.0000000,11.9970703); //object(circuslampost03) (5) CreateDynamicObject(18809,-2205.6010742,-1747.8919678,488.0000000,86.0000000,0.0000000,53.9978027); //object(tube50mglass1) (4) CreateDynamicObject(18800,-2176.1000977,-1799.8929443,495.7999878,0.0000000,0.0000000,324.0000000); //object(mroadhelix1) (1) CreateDynamicObject(18778,-2216.8037109,-1798.7714844,510.0729980,0.0000000,0.0000000,57.9968262); //object(rampt1) (1) CreateDynamicObject(18820,-2245.6999512,-1719.9899902,486.0000000,74.0000000,90.0000000,326.0000000); //object(tube50mglassplus1) (1) CreateDynamicObject(18855,-2277.5449219,-1767.1750488,525.4000244,0.0000000,0.0000000,56.0000000); //object(tube100m180bend1) (1) CreateDynamicObject(18783,-2254.4160156,-1732.5159912,549.7999878,0.0000000,0.0000000,326.0000000); //object(funboxtop1) (2) CreateDynamicObject(18783,-2243.4599609,-1716.1030273,549.7999878,0.0000000,0.0000000,325.9973145); //object(funboxtop1) (6) CreateDynamicObject(18817,-2170.8449707,-1603.1429443,554.0999756,0.0000000,0.0000000,234.0000000); //object(tube50mtsection1) (1) CreateDynamicObject(18835,-2171.9318848,-1601.0560303,466.2189941,0.0000000,0.0000000,0.0000000); //object(rbfunnel) (2) CreateDynamicObject(18851,-2141.6721191,-1562.9000244,563.2620239,0.0000000,0.0000000,54.0000000); //object(tubetoroad1) (1) CreateDynamicObject(18778,-2125.2390137,-1538.9820557,558.4390259,0.0000000,0.0000000,323.9968262); //object(rampt1) (1) CreateDynamicObject(18841,-2317.5119629,-1697.0209961,490.0000000,0.0000000,90.0000000,332.0000000); //object(rb50mbend180tube) (2) CreateDynamicObject(18786,-2326.1499023,-1714.8480225,494.7999878,0.0000000,18.0000000,64.0000000); //object(funboxramp3) (1) CreateDynamicObject(18786,-2318.3906250,-1699.4726562,484.0910034,0.0000000,17.9956055,63.9953613); //object(funboxramp3) (2) CreateDynamicObject(18801,-2339.5700684,-1720.7399902,522.9419556,0.0000000,0.0000000,252.0000000); //object(mroadloop1) (1) CreateDynamicObject(18841,-2368.3369141,-1722.1829834,504.7000122,90.0000000,90.0000000,336.0000000); //object(rb50mbend180tube) (2) CreateDynamicObject(18822,-2365.0000000,-1685.7950439,504.3999939,90.0000000,0.0000000,320.0000000); //object(tube50mglass45bend1) (1) CreateDynamicObject(18841,-2338.4089355,-1663.7259521,520.2000122,0.0000000,0.0000000,210.0000000); //object(rb50mbend180tube) (2) CreateDynamicObject(18836,-2368.5759277,-1682.1030273,536.0999756,0.0000000,0.0000000,302.0000000); //object(rbhalfpipe) (2) CreateDynamicObject(18825,-2389.1489258,-1691.6650391,553.3540039,353.0000000,0.0000000,30.0000000); //object(tube50m180bend1) (1) CreateDynamicObject(18984,-2211.9345703,-1665.5830078,559.7000122,182.9992676,0.0000000,327.9968262); //object(tube100m5) (1) CreateDynamicObject(18983,-2300.4160156,-1694.1700439,557.2000122,0.0000000,0.0000000,58.0000000); //object(tube100m4) (1) CreateDynamicObject(18822,-2362.6101074,-1675.9969482,563.0000000,102.0000000,180.0000000,111.9984741); //object(tube50mglass45bend1) (2) // STUNT-LS.map CreateDynamicObject(4867, 1505.9150390625, -2818.0900878906, 7.4268188476563, 0, 0, 0, -1, 0, -1); CreateDynamicObject(4867, 1715.0563964844, -2818.1237792969, 7.4268188476563, 0, 0, 0, -1, 0, -1); CreateDynamicObject(4867, 1919.5263671875, -2818.1184082031, 7.4268188476563, 0, 0, 0, -1, 0, -1); CreateDynamicObject(4867, 2131.4860839844, -2818.1469726563, 7.4268188476563, 0, 0, 0, -1, 0, -1); CreateDynamicObject(4867, 2132.3740234375, -3001.125, 7.4268188476563, 0, 0, 0, -1, 0, -1); CreateDynamicObject(4867, 1919.765625, -3001.1879882813, 7.4268188476563, 0, 0, 0, -1, 0, -1); CreateDynamicObject(4867, 1707.4641113281, -3001.25, 7.4268188476563, 0, 0, 0, -1, 0, -1); CreateDynamicObject(4867, 1506.0681152344, -3001.2770996094, 7.4268188476563, 0, 0, 0, -1, 0, -1); CreateDynamicObject(4867, 1505.9951171875, -3184.0764160156, 7.4268188476563, 0, 0, 0, -1, 0, -1); CreateDynamicObject(4867, 1718.7922363281, -3184.0712890625, 7.4268188476563, 0, 0, 0, -1, 0, -1); CreateDynamicObject(4867, 1931.5419921875, -3184.0502929688, 7.4268188476563, 0, 0, 0, -1, 0, -1); CreateDynamicObject(4867, 2133.349609375, -3184.0334472656, 7.4268188476563, 0, 0, 0, -1, 0, -1); CreateDynamicObject(8172, 1385.2913818359, -2809.1447753906, 21.307455062866, 0, 45, 0, -1, 0, -1); CreateDynamicObject(8172, 1385.3327636719, -2970.0534667969, 21.307455062866, 0, 44.994506835938, 0, -1, 0, -1); CreateDynamicObject(8172, 1385.3635253906, -3131.3947753906, 21.307455062866, 0, 44.994506835938, 0, -1, 0, -1); CreateDynamicObject(8172, 1385.3477783203, -3292.2565917969, 21.307455062866, 0, 44.994506835938, 0, -1, 0, -1); CreateDynamicObject(8172, 1450.6411132813, -3289.2290039063, 21.307455062866, 0, 44.994506835938, 90, -1, 0, -1); CreateDynamicObject(8172, 1610.5814208984, -3289.2578125, 21.307455062866, 0, 44.989013671875, 90, -1, 0, -1); CreateDynamicObject(8172, 1771.4584960938, -3289.3112792969, 21.307455062866, 0, 44.989013671875, 90, -1, 0, -1); CreateDynamicObject(8172, 1932.6391601563, -3289.3366699219, 21.307455062866, 0, 44.989013671875, 90, -1, 0, -1); CreateDynamicObject(8172, 2093.3728027344, -3289.3591308594, 21.307455062866, 0, 44.989013671875, 90, -1, 0, -1); CreateDynamicObject(8172, 2253.59765625, -3289.4040527344, 21.307455062866, 0, 44.989013671875, 90, -1, 0, -1); CreateDynamicObject(8172, 2240.8911132813, -3221.470703125, 21.307455062866, 0, 44.989013671875, 180, -1, 0, -1); CreateDynamicObject(8172, 2240.9125976563, -3062.1745605469, 21.307455062866, 0, 44.983520507813, 179.99450683594, -1, 0, -1); CreateDynamicObject(8172, 2240.9377441406, -2901.3278808594, 21.307455062866, 0, 44.983520507813, 179.99450683594, -1, 0, -1); CreateDynamicObject(8172, 2240.95703125, -2806.3444824219, 21.307455062866, 0, 44.983520507813, 179.99450683594, -1, 0, -1); CreateDynamicObject(8172, 2254.7158203125, -2805.9489746094, 55.022590637207, 0, 90, 179.99450683594, -1, 0, -1); CreateDynamicObject(8172, 2254.6770019531, -2966.5786132813, 55.022590637207, 0, 90, 179.99450683594, -1, 0, -1); CreateDynamicObject(8172, 2254.6335449219, -3127.4206542969, 55.022590637207, 0, 90, 179.99450683594, -1, 0, -1); CreateDynamicObject(8172, 2254.5993652344, -3288.1369628906, 55.022590637207, 0, 90, 179.99450683594, -1, 0, -1); CreateDynamicObject(8172, 2177.6328125, -3303.3728027344, 55.022590637207, 0, 90, 89.994506835938, -1, 0, -1); CreateDynamicObject(8172, 2016.767578125, -3303.3500976563, 55.022590637207, 0, 90, 89.994506835938, -1, 0, -1); CreateDynamicObject(8172, 1855.5980224609, -3303.2880859375, 55.022590637207, 0, 90, 89.994506835938, -1, 0, -1); CreateDynamicObject(8172, 1694.7312011719, -3303.2534179688, 55.022590637207, 0, 90, 89.994506835938, -1, 0, -1); CreateDynamicObject(8172, 1533.8436279297, -3303.1931152344, 55.022590637207, 0, 90, 89.994506835938, -1, 0, -1); CreateDynamicObject(8172, 1373.357421875, -3303.1525878906, 55.022590637207, 0, 90, 89.994506835938, -1, 0, -1); CreateDynamicObject(8172, 1371.4731445313, -3224.4599609375, 55.022590637207, 0, 90, 359.99450683594, -1, 0, -1); CreateDynamicObject(8172, 1371.4945068359, -3063.5234375, 55.022590637207, 0, 90, 359.98901367188, -1, 0, -1); CreateDynamicObject(8172, 1371.4989013672, -2903.1486816406, 55.022590637207, 0, 90, 359.98901367188, -1, 0, -1); CreateDynamicObject(8172, 1371.4605712891, -2809.1235351563, 55.022590637207, 0, 90, 359.98901367188, -1, 0, -1); CreateDynamicObject(8172, 2174.9875488281, -2727.2133789063, 27.192581176758, 0, 90, 269.99450683594, -1, 0, -1); CreateDynamicObject(8172, 2013.8731689453, -2727.2106933594, 27.192581176758, 0, 90, 269.98901367188, -1, 0, -1); CreateDynamicObject(8172, 1853.5538330078, -2727.1628417969, 27.192581176758, 0, 90, 269.98901367188, -1, 0, -1); CreateDynamicObject(8172, 1693.5799560547, -2727.1469726563, 27.192581176758, 0, 90, 269.98901367188, -1, 0, -1); CreateDynamicObject(8172, 1532.9796142578, -2727.1750488281, 27.192581176758, 0, 90, 269.98901367188, -1, 0, -1); CreateDynamicObject(8172, 1532.9794921875, -2727.1748046875, 27.192581176758, 0, 90, 89.989013671875, -1, 0, -1); CreateDynamicObject(8172, 1693.5791015625, -2727.146484375, 27.192581176758, 0, 90, 89.989013671875, -1, 0, -1); CreateDynamicObject(8172, 1853.5537109375, -2727.162109375, 27.192581176758, 0, 90, 89.989013671875, -1, 0, -1); CreateDynamicObject(8172, 2013.873046875, -2727.2099609375, 27.192581176758, 0, 90, 89.989013671875, -1, 0, -1); CreateDynamicObject(8172, 2174.9873046875, -2727.212890625, 27.192581176758, 0, 90, 89.989013671875, -1, 0, -1); CreateDynamicObject(8172, 1391.1611328125, -2728.4228515625, -5.7373952865601, 270, 0, 359.98352050781, -1, 0, -1); CreateDynamicObject(8172, 1391.1611328125, -2728.4228515625, -5.7373952865601, 269.99450683594, 0, 179.98352050781, -1, 0, -1); CreateDynamicObject(8172, 2174.9873046875, -2727.212890625, 54.992561340332, 0, 90, 269.98901367188, -1, 0, -1); CreateDynamicObject(8172, 2174.9873046875, -2727.212890625, 54.992561340332, 0, 90, 89.989013671875, -1, 0, -1); CreateDynamicObject(8172, 2013.873046875, -2727.2099609375, 54.917625427246, 0, 90, 269.98901367188, -1, 0, -1); CreateDynamicObject(8172, 2013.873046875, -2727.2099609375, 54.917625427246, 0, 90, 89.989013671875, -1, 0, -1); CreateDynamicObject(8172, 1853.5537109375, -2727.162109375, 54.842597961426, 0, 90, 269.98901367188, -1, 0, -1); CreateDynamicObject(8172, 1853.5537109375, -2727.162109375, 54.842597961426, 0, 90, 89.989013671875, -1, 0, -1); CreateDynamicObject(8172, 1693.5791015625, -2727.146484375, 54.732627868652, 0, 90, 269.98901367188, -1, 0, -1); CreateDynamicObject(8172, 1693.5791015625, -2727.146484375, 54.732627868652, 0, 90, 89.989013671875, -1, 0, -1); CreateDynamicObject(8172, 1532.9794921875, -2727.1748046875, 54.647491455078, 0, 90, 269.98901367188, -1, 0, -1); CreateDynamicObject(8172, 1532.9794921875, -2727.1748046875, 54.647491455078, 0, 90, 89.989013671875, -1, 0, -1); CreateDynamicObject(8172, 1414.5709228516, -2728.4094238281, -5.7373952865601, 270, 0, 359.98352050781, -1, 0, -1); CreateDynamicObject(8172, 1414.5703125, -2728.4091796875, -5.7373952865601, 270, 0, 179.98352050781, -1, 0, -1); CreateDynamicObject(8172, 1500.4947509766, -2728.4660644531, 54.622489929199, 0, 90, 269.98901367188, -1, 0, -1); CreateDynamicObject(8172, 1500.494140625, -2728.4658203125, 54.622489929199, 0, 90, 89.989013671875, -1, 0, -1); CreateDynamicObject(8172, 1500.494140625, -2728.4658203125, 38.122489929199, 0, 90, 269.98901367188, -1, 0, -1); CreateDynamicObject(8172, 1500.494140625, -2728.4658203125, 38.122489929199, 0, 90, 89.989013671875, -1, 0, -1); return 1; } [/pawn] return 1; nu este in dreptul cu obiectele
-
Problema este ca oricum as face mi se intampla urmatoarele! Problema 1: -La pilot sa ii trebuiasca Trailer Problema 2: -Truckerii vor putea incarca fara Trailer Oricum l-as face imi da una din aceste probleme.
-
Deci am luat acest fs de pe net si am adaugat acelasi fs dar cu putine modificari(modificari pt pilot) Este acelasi fs de 2 ori doar ca primul ii de trucking si al doilea ii de pilot si nu stiu cum sa le combin.
-
Stock Trucker: [pawn]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_LIGHTBLUE, "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; }[/pawn] Stock Pilot: [pawn]stock CheckpointEnteredTEAM_PILOT(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_LIGHTBLUE, "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)+5); MissionStatus[playerid] = 0; } return 1; }[/pawn] FS-ul intreg: [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 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 AddStaticVehicle(515,-1429.2000,-299.8479,15.0205,227.3141,1,1); // tir AddStaticVehicle(435,-1444.9415,-287.5022,14.6383,231.9411,1,1); // remorca AddStaticVehicle(511,-2125.8181,-128.2662,35.3203,175.6829,1,1); // Plane AddStaticVehicle(511,-2070.8518,-77.0231,35.3203,271.2773,1,1); //Plane 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[]) { if (strcmp("/kill", cmdtext, true, 5) == 0) { SetPlayerHealth(playerid, 0); ForceClassSelection(playerid); return 1; } 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_NewJob2(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); if(GetVehicleModel(vID)== 403 || GetVehicleModel(vID)== 515 || GetVehicleModel(vID)== 593 || 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 T_NewJob2(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); CheckpointEnteredTEAM_PILOT(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_LIGHTBLUE, "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 CheckpointEnteredTEAM_PILOT(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_LIGHTBLUE, "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)+5); MissionStatus[playerid] = 0; } return 1; } stock pName(PN) { new PX[MAX_PLAYER_NAME]; GetPlayerName(PN, PX, sizeof(PX)); return PX; }[/pawn]
-
Am o problema am descarcat de aici mta sa v1.0 cu obiecte 0.3c http://www.sa-mp.ro/forum/index.php?topic=14060.0 convertesc mapa cu Air Burst Converter 1.0.exe si fac un FS de exemplu pun obiectele convertite in fs, iar obiectele (0.3c) se transforma in alte obiecte
-
Daca sterg vID Truckerii vor putea sa incarce fara remorca!
-
Nu merge, imi da: C:\Documents and Settings\SkyNet\Desktop\Untitled.pwn(206) : warning 204: symbol is assigned a value that is never used: "vID" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning. [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 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 AddStaticVehicle(515,-1429.2000,-299.8479,15.0205,227.3141,1,1); // tir AddStaticVehicle(435,-1444.9415,-287.5022,14.6383,231.9411,1,1); // remorca AddStaticVehicle(511,-2125.8181,-128.2662,35.3203,175.6829,1,1); // Plane AddStaticVehicle(511,-2070.8518,-77.0231,35.3203,271.2773,1,1); //Plane 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[]) { if (strcmp("/kill", cmdtext, true, 5) == 0) { SetPlayerHealth(playerid, 0); ForceClassSelection(playerid); return 1; } 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_NewJob2(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); if(GetVehicleModel(vID)== 403 || GetVehicleModel(vID)== 515 || GetVehicleModel(vID)== 593 || 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 T_NewJob2(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]; new vID = GetPlayerVehicleID(playerid); if (!IsTrailerAttachedToVehicle(515)) 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]
-
Errorile le-am rezolvat dar cand vreau sa intru in primul checkpoint cu avionul zice ca am nevoie de trailer pt a incarca problema este din linia asta [pawn]if (!IsTrailerAttachedToVehicle(vID)) return SendClientMessage(playerid, COLOR_RED, "You need a trailer to unload!");[/pawn] daca sterg linia Tiristii pot sa intre in checkpoint fara remorca Cum sa fac sa nu sterg Linia? [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 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 AddStaticVehicle(515,-1429.2000,-299.8479,15.0205,227.3141,1,1); // tir AddStaticVehicle(435,-1444.9415,-287.5022,14.6383,231.9411,1,1); // remorca AddStaticVehicle(511,-2125.8181,-128.2662,35.3203,175.6829,1,1); // Plane AddStaticVehicle(511,-2070.8518,-77.0231,35.3203,271.2773,1,1); //Plane 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[]) { if (strcmp("/kill", cmdtext, true, 5) == 0) { SetPlayerHealth(playerid, 0); return 1; } if (strcmp("/reclass", cmdtext, true, 8) == 0) { ForceClassSelection(playerid); return 1; } 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_NewJob2(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); if(GetVehicleModel(vID)== 403 || GetVehicleModel(vID)== 515 || GetVehicleModel(vID)== 593 || 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 T_NewJob2(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]; 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]