15.08.2017, 07:12

How do i fix these errors?

/* * Dini 1.6 * © Copyright 2006-2008 by DracoBlue * * @author : DracoBlue (http://dracoblue.com) * @date : 13th May 2006 * @update : 16th Sep 2008 * * This file is provided as is (no warranties). * * It's released under the terms of MIT. * * Feel free to use it, a little message in * about box is honouring thing, isn't it? * */ #if defined _dini_included #endinput #endif #define _dini_included #pragma library dini #if defined MAX_STRING #define DINI_MAX_STRING MAX_STRING #else #define DINI_MAX_STRING 255 #endif stock dini_Exists(filename[]) { return fexist(filename); } stock dini_Remove(filename[]) { return fremove(filename); } stock dini_Create(filename[]) { if (fexist(filename)) return false; new File:fhnd; fhnd=fopen(filename,io_write); if (fhnd) { fclose(fhnd); return true; } return false; } stock dini_Set(filename[],key[],value[]) { // If we have no key, it can't be set // we also have no chance to set the value, if all together is bigger then the max string new key_length = strlen(key); new value_length = strlen(value); if (key_length==0 || key_length+value_length+2>DINI_MAX_STRING) return false; new File:fohnd, File:fwhnd; new tmpres[DINI_MAX_STRING]; new bool:wasset=false; // Let's remove the old *.part file if there was one. format(tmpres,sizeof(tmpres),"%s.part",filename); fremove(tmpres); // We'll open the source file. fohnd=fopen(filename,io_read); if (!fohnd) return false; fwhnd=fopen(tmpres,io_write); if (!fwhnd) { // we can't open the second file for writing, so .. let's close the open one and exit. fclose(fohnd); return false; } while (fread(fohnd,tmpres)) { if ( !wasset && tmpres[key_length]=='=' && !strcmp(tmpres, key, true, key_length) ) { // We've got what needs to be replaced! format(tmpres,sizeof(tmpres),"%s=%s",key,value); wasset=true; } else { DINI_StripNewLine(tmpres); } fwrite(fwhnd,tmpres); fwrite(fwhnd,"\r\n"); } if (!wasset) { format(tmpres,sizeof(tmpres),"%s=%s",key,value); fwrite(fwhnd,tmpres); fwrite(fwhnd,"\r\n"); } fclose(fohnd); fclose(fwhnd); format(tmpres,sizeof(tmpres),"%s.part",filename); if (DINI_fcopytextfile(tmpres,filename)) { return fremove(tmpres); } return false; } stock dini_IntSet(filename[],key[],value) { new valuestring[DINI_MAX_STRING]; format(valuestring,DINI_MAX_STRING,"%d",value); return dini_Set(filename,key,valuestring); } stock dini_Int(filename[],key[]) { return strval(dini_Get(filename,key)); } stock dini_FloatSet(filename[],key[],Float:value) { new valuestring[DINI_MAX_STRING]; format(valuestring,DINI_MAX_STRING,"%f",value); return dini_Set(filename,key,valuestring); } stock Float:dini_Float(filename[],key[]) { return floatstr(dini_Get(filename,key)); } stock dini_Bool(filename[],key[]) { return strval(dini_Get(filename,key)); } stock dini_BoolSet(filename[],key[],value) { if (value) { return dini_Set(filename,key,"1"); } return dini_Set(filename,key,"0"); } stock dini_Unset(filename[],key[]) { // If we have no key, it can't be set // we also have no chance to unset the key, if all together is bigger then the max string new key_length = strlen(key); if (key_length==0 || key_length+2>DINI_MAX_STRING) return false; new File:fohnd, File:fwhnd; new tmpres[DINI_MAX_STRING]; // Let's remove the old *.part file if there was one. format(tmpres,DINI_MAX_STRING,"%s.part",filename); fremove(tmpres); // We'll open the source file. fohnd=fopen(filename,io_read); if (!fohnd) return false; fwhnd=fopen(tmpres,io_write); if (!fwhnd) { // we can't open the second file for writing, so .. let's close the open one and exit. fclose(fohnd); return false; } while (fread(fohnd,tmpres)) { if ( tmpres[key_length]=='=' && !strcmp(tmpres, key, true, key_length) ) { // We've got what needs to be removed! } else { DINI_StripNewLine(tmpres); fwrite(fwhnd,tmpres); fwrite(fwhnd,"\r\n"); } } fclose(fohnd); fclose(fwhnd); format(tmpres,DINI_MAX_STRING,"%s.part",filename); if (DINI_fcopytextfile(tmpres,filename)) { return fremove(tmpres); } return false; } stock dini_Get(filename[],key[]) { new tmpres[DINI_MAX_STRING]; new key_length = strlen(key); if (key_length==0 || key_length+2>DINI_MAX_STRING) return tmpres; new File:fohnd; fohnd=fopen(filename,io_read); if (!fohnd) return tmpres; while (fread(fohnd,tmpres)) { if ( tmpres[key_length]=='=' && !strcmp(tmpres, key, true, key_length) ) { /* We've got what we need */ DINI_StripNewLine(tmpres); strmid(tmpres, tmpres, key_length + 1, strlen(tmpres), DINI_MAX_STRING); fclose(fohnd); return tmpres; } } fclose(fohnd); return tmpres; } stock dini_Isset(filename[],key[]) { new key_length = strlen(key); if (key_length==0 || key_length+2>DINI_MAX_STRING) return false; new File:fohnd; fohnd=fopen(filename,io_read); if (!fohnd) return false; new tmpres[DINI_MAX_STRING]; while (fread(fohnd,tmpres)) { if ( tmpres[key_length]=='=' && !strcmp(tmpres, key, true, key_length) ) { // We've got what we need fclose(fohnd); return true; } } fclose(fohnd); return false; } stock DINI_StripNewLine(string[]) { new len = strlen(string); if (string[0]==0) return ; if ((string[len - 1] == '\n') || (string[len - 1] == '\r')) { string[len - 1] = 0; if (string[0]==0) return ; if ((string[len - 2] == '\n') || (string[len - 2] == '\r')) string[len - 2] = 0; } } stock DINI_fcopytextfile(oldname[],newname[]) { new File:ohnd,File:nhnd; if (!fexist(oldname)) return false; ohnd=fopen(oldname,io_read); if (!ohnd) return false; nhnd=fopen(newname,io_write); if (!nhnd) { fclose(ohnd); return false; } new tmpres[DINI_MAX_STRING]; while (fread(ohnd,tmpres)) { DINI_StripNewLine(tmpres); format(tmpres,sizeof(tmpres),"%s\r\n",tmpres); fwrite(nhnd,tmpres); } fclose(ohnd); fclose(nhnd); return true; }
/* * DUtils functions 1.10 * © Copyright 2006-2007 by DracoBlue * * @author : DracoBlue (http://dracoblue.com) * @date : 8th April 2006 * @update : 12th July 2007 * * This file is provided as is (no warranties). * */ #if defined _dutils_included #endinput #endif #define _dutils_included #pragma library dutils #define MAX_STRING 255 new PRIVATE_Last_Money[MAX_PLAYERS]; /* * First version released by mike, this one created by DracoBlue * Has also a fix to use "-" and "+" in the beginning of the number. */ stock isNumeric(const string[]) { new length=strlen(string); if (length==0) return false; for (new i = 0; i < length; i++) { if ( (string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+') // Not a number,'+' or '-' || (string[i]=='-' && i!=0) // A '-' but not at first. || (string[i]=='+' && i!=0) // A '+' but not at first. ) return false; } if (length==1 && (string[0]=='-' || string[0]=='+')) return false; return true; } /* * Originally created by mabako, tuned by DracoBlue */ stock mktime(hour,minute,second,day,month,year) { new timestamp2; timestamp2 = second + (minute * 60) + (hour * 3600); new days_of_month[12]; if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) ) { days_of_month = {31,29,31,30,31,30,31,31,30,31,30,31}; // Schaltjahr } else { days_of_month = {31,28,31,30,31,30,31,31,30,31,30,31}; // keins } new days_this_year = 0; days_this_year = day; if(month > 1) { // No January Calculation, because its always the 0 past months for(new i=0; i<month-1;i++) { days_this_year += days_of_month[i]; } } timestamp2 += days_this_year * 86400; for(new j=1970;j<year;j++) { timestamp2 += 31536000; if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) ) timestamp2 += 86400; // Schaltjahr + 1 Tag } return timestamp2; } /** * Return if a Email is valid or not * @param value */ stock ValidEmail(email[]) { new len=strlen(email); new cstate=0; new i; for(i=0;i<len;i++) { if ((cstate==0 || cstate==1) && (email[i]>='A' && email[i]<='Z') || (email[i]>='a' && email[i]<='z') || (email[i]=='.') || (email[i]=='-') || (email[i]=='_')) { } else { // Ok no A..Z,a..z,_,.,- if ((cstate==0) &&(email[i]=='@')) { // its an @ after the name, ok state=1; cstate=1; } else { // Its stuff which is not allowed return false; } } } if (cstate<1) return false; if (len<6) return false; // A toplevel domain has only 3 to 4 signs :-) if ((email[len-3]=='.') || (email[len-4]=='.') || (email[len-5]=='.')) return true; return false; } /** * Return a timestamp */ stock Time() { new hour,minute,second; new year, month,day; gettime(hour, minute, second); getdate(year, month, day); return mktime(hour,minute,second,day,month,year); } /** * Return a timestamp */ stock Now() { new hour,minute,second; new year, month,day; gettime(hour, minute, second); getdate(year, month, day); return mktime(hour,minute,second,day,month,year); } /** * Return the value of an hex-string * @param string */ stock HexToInt(string[]) { if (string[0]==0) return 0; new i; new cur=1; new res=0; for (i=strlen(string);i>0;i--) { if (string[i-1]<58) res=res+cur*(string[i-1]-48); else res=res+cur*(string[i-1]-65+10); cur=cur*16; } return res; } /** * Return the int as string * @param number */ stock IntToHex(number) { new m=1; new depth=0; while (number>=m) { m = m*16; depth++; } depth--; new str[MAX_STRING]; for (new i = depth; i >= 0; i--) { str[i] = ( number & 0x0F) + 0x30; // + (tmp > 9 ? 0x07 : 0x00) str[i] += (str[i] > '9') ? 0x07 : 0x00; number >>= 4; } str[8] = '\0'; return str; } /** * Return the string as int * @param string */ stock StrToInt(string[]) { return strval(string); } /** * Return the value as string * @param value */ stock IntToStr(value) { new tmp[MAX_STRING]; valstr(tmp, value); return tmp; } /** * Return the truncated value * @param Float:value */ stock trunc(Float:value) { return floatround(value,floatround_floor); } /** * Sets money for player * @param playerid * howmuch */ stock SetPlayerMoney(playerid,howmuch) { PRIVATE_Last_Money[playerid]=howmuch; GivePlayerMoney(playerid,howmuch-GetPlayerMoney(playerid)); } /** * Copies a file (Source file won't be deleted!) * @param oldname * newname * @requires WINDOWS */ stock fcopy(oldname[],newname[]) { new File:ohnd,File:nhnd; if (!fexist(oldname)) return false; ohnd=fopen(oldname,io_read); nhnd=fopen(newname,io_write); new buf2[1]; new i; for (i=flength(ohnd);i>0;i--) { fputchar(nhnd, fgetchar(ohnd, buf2[0],false),false); } fclose(ohnd); fclose(nhnd); return true; } /** * Copies a textfile (Source file won't be deleted!) * @param oldname * newname */ stock fcopytextfile(oldname[],newname[]) { new File:ohnd,File:nhnd; if (!fexist(oldname)) return false; ohnd=fopen(oldname,io_read); nhnd=fopen(newname,io_write); new tmpres[MAX_STRING]; while (fread(ohnd,tmpres)) { StripNewLine(tmpres); format(tmpres,sizeof(tmpres),"%s\r\n",tmpres); fwrite(nhnd,tmpres); } fclose(ohnd); fclose(nhnd); return true; } /** * Renames a file (Source file will be deleted!) * @param oldname * newname * @requires WINDOWS (because fcopy does) */ stock frename(oldname[],newname[]) { if (!fexist(oldname)) return false; fremove(newname); if (!fcopy(oldname,newname)) return false; fremove(oldname); return true; } /** * Renames a file (Source file will be deleted!) * @param oldname * newname */ stock frenametextfile(oldname[],newname[]) { if (!fexist(oldname)) return false; fremove(newname); if (!fcopytextfile(oldname,newname)) return false; fremove(oldname); return true; } /** * Strips Newline from the end of a string. * Idea: ******, Bugfixing (when length=1) by DracoBlue * @param string */ stock StripNewLine(string[]) { new len = strlen(string); if (string[0]==0) return ; if ((string[len - 1] == '\n') || (string[len - 1] == '\r')) { string[len - 1] = 0; if (string[0]==0) return ; if ((string[len - 2] == '\n') || (string[len - 2] == '\r')) string[len - 2] = 0; } } /** * Copies items from one array/string into return. * @param source * index (where to start, 0 is first) * numbytes (how much) */ ret_memcpy(source[],index=0,numbytes) { new tmp[MAX_STRING]; new i=0; tmp[0]=0; if (index>=strlen(source)) return tmp; if (numbytes+index>=strlen(source)) numbytes=strlen(source)-index; if (numbytes<=0) return tmp; for (i=index;i<numbytes+index;i++) { tmp[i-index]=source[i]; if (source[i]==0) return tmp; } tmp[numbytes]=0; return tmp; } /** * Copies items from one array/string into another. * @param dest * source * count */ stock copy(dest[],source[],count) { dest[0]=0; if (count<0) return false; if (count>strlen(source)) count=strlen(source); new i=0; for (i=0;i<count;i++) { dest[i]=source[i]; if (source[i]==0) return true; } dest[count]=0; return true; } /** * Deletes the first 'count' items of a array/string * @param string[] * count */ stock delete(string[],count) { new tmp[MAX_STRING]; tmp[0]=0; if (count<=0) { format(tmp,sizeof(tmp),"%s",string); return tmp; } tmp=ret_memcpy(string,count,strlen(string)); return tmp; } /** * Sets a string's value to source. * @param dest * source * count */ stock set(dest[],source[]) { new count = strlen(source); new i=0; for (i=0;i<count;i++) { dest[i]=source[i]; } dest[count]=0; } /** * Checks wether two strings are equal (case insensetive) * @param str1 * str2 */ stock equal(str1[],str2[],bool:ignorecase) { if (strlen(str1)!=strlen(str2)) return false; if (strcmp(str1,str2,ignorecase)==0) return true; return false; } /** * Returns an element of a string splitted by ' ', default index is 0. * @param string * index */ stock strtok(const string[], &index,seperator=' ') { new length = strlen(string); new offset = index; new result[MAX_STRING]; while ((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; if ((index < length) && (string[index] == seperator)) { index++; } return result; } stock mod(up,down) { return up-(floatround((up/down),floatround_floor))*down; } stock div(up,down) { return (floatround((up/down),floatround_floor)); } /** * Returns a hashed value in adler32 as int * @param buf */ stock num_hash(buf[]) { new length=strlen(buf); new s1 = 1; new s2 = 0; new n; for (n=0; n<length; n++) { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) + s1; } /** * Returns a hashed value in adler32 as string * @param buf */ stock hash(str2[]) { new tmpdasdsa[MAX_STRING]; tmpdasdsa[0]=0; valstr(tmpdasdsa,num_hash(str2)); return tmpdasdsa; } /** * Returns a string which has 'newstr' where 'trg' was before * @param trg * newstr * src */ stock strreplace(trg[],newstr[],src[]) { new f=0; new s1[MAX_STRING]; new tmp[MAX_STRING]; format(s1,sizeof(s1),"%s",src); f = strfind(s1,trg); tmp[0]=0; while (f>=0) { strcat(tmp,ret_memcpy(s1, 0, f)); strcat(tmp,newstr); format(s1,sizeof(s1),"%s",ret_memcpy(s1, f+strlen(trg), strlen(s1)-f)); f = strfind(s1,trg); } strcat(tmp,s1); return tmp; } /** * Returns the string with lowercase * @param txt */ stock strlower(txt[]) { new tmp[MAX_STRING]; tmp[0]=0; if (txt[0]==0) return tmp; new i=0; for (i=0;i<strlen(txt);i++) { tmp[i]=tolower(txt[i]); } tmp[strlen(txt)]=0; return tmp; } /** * Returns the string with uppercase * @param txt */ stock strupper(txt[]) { new tmp[MAX_STRING]; tmp[0]=0; if (txt[0]==0) return tmp; new i=0; for (i=0;i<strlen(txt);i++) { tmp[i]=toupper(txt[i]); } tmp[strlen(txt)]=0; return tmp; }
/* YSF - kurta999's version */
#if defined _YSF_included
#endinput
#endif
#define _YSF_included
#define YSF_ERROR_ISNT_LOADED cellmin
#define YSF_ERROR_PARAMETER_COUNT_ISNT_EQUAL (cellmin + 1)
#define YSF_ERROR_PARAMETER_COUNT_ISNT_ENOUGH (cellmin + 2)
// Definitions
enum E_SERVER_RULE_FLAGS (<<= 1)
{
CON_VARFLAG_DEBUG = 1,
CON_VARFLAG_READONLY,
CON_VARFLAG_RULE,
CON_VARFLAG_UNREMOVABLE
}
enum E_SCM_EVENT_TYPE
{
SCM_EVENT_PAINTJOB = 1,
SCM_EVENT_MOD = 2,
SCM_EVENT_RESPRAY = 3,
SCM_EVENT_MOD_SHOP = 4
}
// Execute
native execute(const command[], saveoutput=0, index=0);
// File functions
native ffind(const pattern[], filename[], len, &idx);
native frename(const oldname[], const newname[]);
// Directory functions
native dfind(const pattern[], filename[], len, &idx);
native dcreate(const name[]);
native drename(const oldname[], const newname[]);
// Gamemode restart time
native SetModeRestartTime(Float:time);
native Float:GetModeRestartTime();
// Max player/npc change at runtime
native SetMaxPlayers(maxplayers);
native SetMaxNPCs(maxnpcs);
// Filterscript functions
native LoadFilterScript(const scriptname[]); // difference between "rcon loadfs": Return -> True if success, false if not
native UnLoadFilterScript(const scriptname[]); // ^
native GetFilterScriptCount();
native GetFilterScriptName(id, name[], len = sizeof(name));
// Server rule modifications
native AddServerRule(const name[], const value[], E_SERVER_RULE_FLAGS:flags = CON_VARFLAG_RULE);
native SetServerRule(const name[], const value[]);
native IsValidServerRule(const name[]);
native SetServerRuleFlags(const name[], E_SERVER_RULE_FLAGS:flags);
native E_SERVER_RULE_FLAGS:GetServerRuleFlags(const name[]);
// Server settings
native GetServerSettings(&showplayermarkes, &shownametags, &stuntbonus, &useplayerpedanims, &bLimitchatradius, &disableinteriorenterexits, &nametaglos, &manualvehicleengine, &limitplayermarkers, &vehiclefriendlyfire, &defaultcameracollision, &Float:fGlobalchatradius, &Float:fNameTagDrawDistance, &Float:fPlayermarkerslimit);
native GetNPCCommandLine(npcid, npcscript[], length = sizeof(npcscript));
// Player position sync bounds
native GetSyncBounds(&Float:hmin, &Float:hmax, &Float:vmin, &Float:vmax);
native SetSyncBounds(Float:hmin, Float:hmax, Float:vmin, Float:vmax);
// Toggling RCON commands
native GetRCONCommandName(const cmdname[], changedname[], len = sizeof(changedname));
native ChangeRCONCommandName(const cmdname[], changedname[]);
// Per AMX function calling
native CallFunctionInScript(const scriptname[], const function[], const format[], {Float,_}:...);
// Broadcasting console messages
native EnableConsoleMSGsForPlayer(playerid, color);
native DisableConsoleMSGsForPlayer(playerid);
native HasPlayerConsoleMessages(playerid, &color = 0);
// YSF settings
native YSF_SetTickRate(ticks);
native YSF_GetTickRate();
native YSF_EnableNightVisionFix(enable);
native YSF_IsNightVisionFixEnabled();
native YSF_ToggleOnServerMessage(toggle);
native YSF_IsOnServerMessageEnabled();
native YSF_SetExtendedNetStatsEnabled(enable);
native YSF_IsExtendedNetStatsEnabled();
native YSF_SetAFKAccuracy(time_ms);
native YSF_GetAFKAccuracy();
native SetRecordingDirectory(const dir[]);
native GetRecordingDirectory(dir[], len = sizeof(dir));
// Nickname
native IsValidNickName(const name[]);
native AllowNickNameCharacter(character, bool:allow);
native IsNickNameCharacterAllowed(character);
// Classes
native GetAvailableClasses();
native GetPlayerClass(classid, &teamid, &modelid, &Float:spawn_x, &Float:spawn_y, &Float:spawn_z, &Float:z_angle, &weapon1, &weapon1_ammo, &weapon2, &weapon2_ammo,& weapon3, &weapon3_ammo);
native EditPlayerClass(classid, teamid, modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
// Timers
native GetRunningTimers();
// Per player things
native SetPlayerGravity(playerid, Float:gravity);
native Float:GetPlayerGravity(playerid);
native SetPlayerAdmin(playerid, bool:admin); // Set player as RCON admin
native SetPlayerTeamForPlayer(playerid, teamplayerid, teamid);
native GetPlayerTeamForPlayer(playerid, teamplayerid);
native SetPlayerSkinForPlayer(playerid, skinplayerid, skin);
native GetPlayerSkinForPlayer(playerid, skinplayerid);
native SetPlayerNameForPlayer(playerid, nameplayerid, const playername[]);
native GetPlayerNameForPlayer(playerid, nameplayerid, playername[], size = sizeof(playername));
native SetPlayerFightStyleForPlayer(playerid, styleplayerid, style);
native GetPlayerFightStyleForPlayer(playerid, skinplayerid);
native SetPlayerPosForPlayer(playerid, posplayerid, Float:fX, Float:fY, Float:fZ, bool:forcesync = true);
native SetPlayerRotationQuatForPlayer(playerid, quatplayerid, Float:w, Float:x, Float:y, Float:z, bool:forcesync = true);
native ApplyAnimationForPlayer(playerid, animplayerid, const animlib[], const animname[], Float:fDelta, loop, lockx, locky, freeze, time); // DOESN'T WORK
native GetPlayerWeather(playerid);
native TogglePlayerWidescreen(playerid, bool:set);
native IsPlayerWidescreenToggled(playerid);
native GetSpawnInfo(playerid, &teamid, &modelid, &Float:spawn_x, &Float:spawn_y, &Float:spawn_z, &Float:z_angle, &weapon1, &weapon1_ammo, &weapon2, &weapon2_ammo,& weapon3, &weapon3_ammo);
native GetPlayerSkillLevel(playerid, skill);
native IsPlayerCheckpointActive(playerid);
native GetPlayerCheckpoint(playerid, &Float:fX, &Float:fY, &Float:fZ, &Float:fSize);
native IsPlayerRaceCheckpointActive(playerid);
native GetPlayerRaceCheckpoint(playerid, &Float:fX, &Float:fY, &Float:fZ, &Float:fNextX, &Float:fNextY, &Float:fNextZ, &Float:fSize);
native GetPlayerWorldBounds(playerid, &Float:x_max, &Float:x_min, &Float:y_max, &Float:y_min);
native IsPlayerInModShop(playerid);
native GetPlayerSirenState(playerid);
native GetPlayerLandingGearState(playerid);
native GetPlayerHydraReactorAngle(playerid);
native Float:GetPlayerTrainSpeed(playerid);
native Float:GetPlayerZAim(playerid);
native GetPlayerSurfingOffsets(playerid, &Float:fOffsetX, &Float:fOffsetY, &Float:fOffsetZ);
native GetPlayerRotationQuat(playerid, &Float:w, &Float:x, &Float:y, &Float:z);
native GetPlayerDialogID(playerid);
native GetPlayerSpectateID(playerid);
native GetPlayerSpectateType(playerid);
native GetPlayerLastSyncedVehicleID(playerid);
native GetPlayerLastSyncedTrailerID(playerid);
native SendBulletData(senderid, forplayerid = -1, weaponid, hittype, hitid, Float:fHitOriginX, Float:fHitOriginY, Float:fHitOriginZ, Float:fHitTargetX, Float:fHitTargetY, Float:fHitTargetZ, Float:fCenterOfHitX, Float:fCenterOfHitY, Float:fCenterOfHitZ);
native ShowPlayerForPlayer(forplayerid, playerid);
native HidePlayerForPlayer(forplayerid, playerid);
native AddPlayerForPlayer(forplayerid, playerid, isnpc = 0);
native RemovePlayerForPlayer(forplayerid, playerid);
native SetPlayerChatBubbleForPlayer(forplayerid, playerid, const text[], color, Float:drawdistance, expiretime);
native ResetPlayerMarkerForPlayer(playerid, resetplayerid);
native SetPlayerVersion(playerid, const version[]);
native IsPlayerSpawned(playerid);
native IsPlayerControllable(playerid);
native SpawnForWorld(playerid);
native BroadcastDeath(playerid);
native IsPlayerCameraTargetEnabled(playerid);
native SetPlayerDisabledKeysSync(playerid, keys, updown = 0, leftright = 0);
native GetPlayerDisabledKeysSync(playerid, &keys, &updown = 0, &leftright = 0);
// Actors
native GetActorSpawnInfo(actorid, &skinid, &Float:fX, &Float:fY, &Float:fZ, &Float:fAngle);
native GetActorSkin(actorid);
native GetActorAnimation(actorid, animlib[], animlibsize = sizeof(animlib), animname[], animnamesize = sizeof(animname), &Float:fDelta, &loop, &lockx, &locky, &freeze, &time);
// Scoreboard manipulation
native TogglePlayerScoresPingsUpdate(playerid, bool:toggle);
native TogglePlayerFakePing(playerid, bool:toggle);
native SetPlayerFakePing(playerid, ping);
native TogglePlayerInServerQuery(playerid, bool:toggle);
native IsPlayerToggledInServerQuery(playerid);
// Pause functions
native IsPlayerPaused(playerid);
native GetPlayerPausedTime(playerid);
// Objects get - global
native Float:GetObjectDrawDistance(objectid);
native SetObjectMoveSpeed(objectid, Float:fSpeed);
native Float:GetObjectMoveSpeed(objectid);
native GetObjectTarget(objectid, &Float:fX, &Float:fY, &Float:fZ);
native GetObjectAttachedData(objectid, &attached_vehicleid, &attached_objectid, &attached_playerid);
native GetObjectAttachedOffset(objectid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ);
native IsObjectMaterialSlotUsed(objectid, materialindex); // Return values: 1 = material, 2 = material text
native GetObjectMaterial(objectid, materialindex, &modelid, txdname[], txdnamelen = sizeof(txdname), texturename[], texturenamelen = sizeof(texturename), &materialcoor);
native GetObjectMaterialText(objectid, materialindex, text[], textlen = sizeof(text), &materialsize, fontface[], fontfacelen = sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment);
native IsObjectNoCameraCol(objectid);
// Objects get - player
native Float:GetPlayerObjectDrawDistance(playerid, objectid);
native SetPlayerObjectMoveSpeed(playerid, objectid, Float:fSpeed);
native Float:GetPlayerObjectMoveSpeed(playerid, objectid);
native Float:GetPlayerObjectTarget(playerid, objectid, &Float:fX, &Float:fY, &Float:fZ);
native GetPlayerObjectAttachedData(playerid, objectid, &attached_vehicleid, &attached_objectid, &attached_playerid);
native GetPlayerObjectAttachedOffset(playerid, objectid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ);
native IsPlayerObjectMaterialSlotUsed(playerid, objectid, materialindex); // Return values: 1 = material, 2 = material text
native GetPlayerObjectMaterial(playerid, objectid, materialindex, &modelid, txdname[], txdnamelen = sizeof(txdname), texturename[], texturenamelen = sizeof(texturename), &materialcolor);
native GetPlayerObjectMaterialText(playerid, objectid, materialindex, text[], textlen = sizeof(text), &materialsize, fontface[], fontfacelen = sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment);
native IsPlayerObjectNoCameraCol(playerid, objectid);
native GetPlayerSurfingPlayerObjectID(playerid);
native GetPlayerCameraTargetPlayerObj(playerid);
native GetObjectType(playerid, objectid);
// special - for attached objects
native GetPlayerAttachedObject(playerid, index, &modelid, &bone, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fSacleX, &Float:fScaleY, &Float:fScaleZ, &materialcolor1, &materialcolor2);
//n_ative AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);
native AttachPlayerObjectToObject(playerid, objectid, attachtoid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ, SyncRotation = 1);
// RakNet ban functions
native ClearBanList();
native IsBanned(const ipaddress[]);
// RakNet
native SetTimeoutTime(playerid, time_ms);
native GetLocalIP(index, localip[], len = sizeof(localip));
// Exclusive RPC broadcast
native SetExclusiveBroadcast(toggle);
native BroadcastToPlayer(playerid, toggle=1);
// Vehicle functions
native GetVehicleSpawnInfo(vehicleid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRot, &color1, &color2);
native SetVehicleSpawnInfo(vehicleid, modelid, Float:fX, Float:fY, Float:fZ, Float:fAngle, color1, color2, respawntime = -2, interior = -2);
#if !defined GetVehicleColor
native GetVehicleColor(vehicleid, &color1, &color2);
#endif
#if !defined GetVehiclePaintjob
native GetVehiclePaintjob(vehicleid);
#endif
#if !defined GetVehicleInterior
native GetVehicleInterior(vehicleid);
#endif
native GetVehicleNumberPlate(vehicleid, plate[], len = sizeof(plate));
native SetVehicleRespawnDelay(vehicleid, delay);
native GetVehicleRespawnDelay(vehicleid);
native SetVehicleOccupiedTick(vehicleid, ticks);
native GetVehicleOccupiedTick(vehicleid); // GetTickCount() - GetVehicleOccupiedTick(vehicleid) = time passed since vehicle is occupied, in ms
native SetVehicleRespawnTick(vehicleid, ticks);
native GetVehicleRespawnTick(vehicleid); // GetTickCount() - GetVehicleRespawnTick(vehicleid) = time passed since vehicle spawned, in ms
native GetVehicleLastDriver(vehicleid);
native GetVehicleCab(vehicleid);
native HasVehicleBeenOccupied(vehicleid);
native SetVehicleBeenOccupied(vehicleid, occupied);
native IsVehicleOccupied(vehicleid);
native IsVehicleDead(vehicleid);
native SetVehicleParamsSirenState(vehicleid, sirenState);
native ToggleVehicleSirenEnabled(vehicleid, enabled);
native IsVehicleSirenEnabled(vehicleid);
native GetVehicleMatrix(vehicleid, &Float:rightX, &Float:rightY, &Float:rightZ, &Float:upX, &Float:upY, &Float:upZ, &Float:atX, &Float:atY, &Float:atZ);
native GetVehicleModelCount(modelid);
native GetVehicleModelsUsed();
// Gangzones - Global
native IsValidGangZone(zoneid);
native IsPlayerInGangZone(playerid, zoneid);
native IsGangZoneVisibleForPlayer(playerid, zoneid);
native GangZoneGetColorForPlayer(playerid, zoneid);
native GangZoneGetFlashColorForPlayer(playerid, zoneid);
native IsGangZoneFlashingForPlayer(playerid, zoneid);
native GangZoneGetPos(zoneid, &Float:fMinX, &Float:fMinY, &Float:fMaxX, &Float:fMaxY);
// Gangzones - Player
native CreatePlayerGangZone(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy);
native PlayerGangZoneDestroy(playerid, zoneid);
native PlayerGangZoneShow(playerid, zoneid, color);
native PlayerGangZoneHide(playerid, zoneid);
native PlayerGangZoneFlash(playerid, zoneid, color);
native PlayerGangZoneStopFlash(playerid, zoneid);
native IsValidPlayerGangZone(playerid, zoneid);
native IsPlayerInPlayerGangZone(playerid, zoneid);
native IsPlayerGangZoneVisible(playerid, zoneid);
native PlayerGangZoneGetColor(playerid, zoneid);
native PlayerGangZoneGetFlashColor(playerid, zoneid);
native IsPlayerGangZoneFlashing(playerid, zoneid);
native PlayerGangZoneGetPos(playerid, zoneid, &Float:fMinX, &Float:fMinY, &Float:fMaxX, &Float:fMaxY);
// Textdraw - Global
native IsValidTextDraw(Text:textdrawid);
native IsTextDrawVisibleForPlayer(playerid, Text:textdrawid);
native TextDrawGetString(Text:textdrawid, text[], len = sizeof(text));
native TextDrawSetPos(Text:textdrawid, Float:fX, Float:fY); // You can change textdraw pos with it, but you need to use TextDrawShowForPlayer() after that
native TextDrawGetLetterSize(Text:textdrawid, &Float:fX, &Float:fY);
native TextDrawGetTextSize(Text:textdrawid, &Float:fX, &Float:fY);
native TextDrawGetPos(Text:textdrawid, &Float:fX, &Float:fY);
native TextDrawGetColor(Text:textdrawid);
native TextDrawGetBoxColor(Text:textdrawid);
native TextDrawGetBackgroundColor(Text:textdrawid);
native TextDrawGetShadow(Text:textdrawid);
native TextDrawGetOutline(Text:textdrawid);
native TextDrawGetFont(Text:textdrawid);
native TextDrawIsBox(Text:textdrawid);
native TextDrawIsProportional(Text:textdrawid);
native TextDrawIsSelectable(Text:textdrawid);
native TextDrawGetAlignment(Text:textdrawid);
native TextDrawGetPreviewModel(Text:textdrawid);
native TextDrawGetPreviewRot(Text:textdrawid, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fZoom);
native TextDrawGetPreviewVehCol(Text:textdrawid, &color1, &color2);
native TextDrawSetStringForPlayer(Text:textdrawid, playerid, const string[], {Float,_}:...);
// Textdraw - Player
native IsValidPlayerTextDraw(playerid, PlayerText:textdrawid);
native IsPlayerTextDrawVisible(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetString(playerid, PlayerText:textdrawid, text[], len = sizeof(text));
native PlayerTextDrawSetPos(playerid, PlayerText:textdrawid, Float:fX, Float:fY);
native PlayerTextDrawGetLetterSize(playerid, PlayerText:textdrawid, &Float:fX, &Float:fY);
native PlayerTextDrawGetTextSize(playerid, PlayerText:textdrawid, &Float:fX, &Float:fY);
native PlayerTextDrawGetPos(playerid, PlayerText:textdrawid, &Float:fX, &Float:fY);
native PlayerTextDrawGetColor(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetBoxColor(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetBackgroundCol(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetShadow(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetOutline(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetFont(playerid, PlayerText:textdrawid);
native PlayerTextDrawIsBox(playerid, PlayerText:textdrawid);
native PlayerTextDrawIsProportional(playerid, PlayerText:textdrawid);
native PlayerTextDrawIsSelectable(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetAlignment(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetPreviewModel(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetPreviewRot(playerid, PlayerText:textdrawid, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fZoom);
native PlayerTextDrawGetPreviewVehCol(playerid, PlayerText:textdrawid, &color1, &color2);
// 3D Text - Global
native IsValid3DTextLabel(Text3D:id);
native Is3DTextLabelStreamedIn(playerid, Text3D:id);
native Get3DTextLabelText(Text3D:id, text[], len = sizeof(text));
native Get3DTextLabelColor(Text3D:id);
native Get3DTextLabelPos(Text3D:id, &Float:fX, &Float:fY, &Float:fZ);
native Float:Get3DTextLabelDrawDistance(Text3D:id);
native Get3DTextLabelLOS(Text3D:id);
native Get3DTextLabelVirtualWorld(Text3D:id);
native Get3DTextLabelAttachedData(Text3D:id, &attached_playerid, &attached_vehicleid);
// 3D Text - Player
native IsValidPlayer3DTextLabel(playerid, PlayerText3D:id);
native GetPlayer3DTextLabelText(playerid, PlayerText3D:id, text[], len = sizeof(text));
native GetPlayer3DTextLabelColor(playerid, PlayerText3D:id);
native GetPlayer3DTextLabelPos(playerid, PlayerText3D:id, &Float:fX, &Float:fY, &Float:fZ);
native Float:GetPlayer3DTextLabelDrawDist(playerid, PlayerText3D:id);
native GetPlayer3DTextLabelLOS(playerid, PlayerText3D:id);
native GetPlayer3DTextLabelVirtualW(playerid, PlayerText3D:id);
native GetPlayer3DTextLabelAttached(playerid, PlayerText3D:id, &attached_playerid, &attached_vehicleid);
// Menu
native IsMenuDisabled(Menu:menuid);
native IsMenuRowDisabled(Menu:menuid, row);
native GetMenuColumns(Menu:menuid);
native GetMenuItems(Menu:menuid, column);
native GetMenuPos(Menu:menuid, &Float:fX, &Float:fY);
native GetMenuColumnWidth(Menu:menuid, &Float:fColumn1, &Float:fColumn2);
native GetMenuColumnHeader(Menu:menuid, column, header[], len = sizeof(header));
native GetMenuItem(Menu:menuid, column, itemid, item[], len = sizeof(item));
// Pickups - Global
native IsValidPickup(pickupid);
native IsPickupStreamedIn(playerid, pickupid);
native GetPickupPos(pickupid, &Float:fX, &Float:fY, &Float:fZ);
native GetPickupModel(pickupid);
native GetPickupType(pickupid);
native GetPickupVirtualWorld(pickupid);
/*
// Pickups - Player
native CreatePlayerPickup(playerid, model, type, Float:X, Float:Y, Float:Z, virtualworld = 0);
native DestroyPlayerPickup(playerid, pickupid);
native IsValidPlayerPickup(playerid, pickupid);
native IsPlayerPickupStreamedIn(playerid, pickupid);
native GetPlayerPickupPos(playerid, pickupid, &Float:fX, &Float:fY, &Float:fZ);
native GetPlayerPickupModel(playerid, pickupid);
native GetPlayerPickupType(playerid, pickupid);
native GetPlayerPickupVirtualWorld(playerid, pickupid);
*/
// ******'s model sizes inc
native GetColCount();
native Float:GetColSphereRadius(modelid);
native GetColSphereOffset(modelid, &Float:fX, &Float:fY, &Float:fZ);
// Formatting
native SendClientMessagef(playerid, color, const message[], {Float,_}:...);
native SendClientMessageToAllf(color, const message[], {Float,_}:...);
native GameTextForPlayerf(playerid, displaytime, style, const message[], {Float,_}:...);
native GameTextForAllf(displaytime, style, const message[], {Float,_}:...);
native SendPlayerMessageToPlayerf(playerid, senderid, const message[], {Float,_}:...);
native SendPlayerMessageToAllf(senderid, const message[], {Float,_}:...);
native SendRconCommandf(const command[], {Float,_}:...);
// Callbacks
forward OnPlayerEnterGangZone(playerid, zoneid);
forward OnPlayerLeaveGangZone(playerid, zoneid);
forward OnPlayerEnterPlayerGangZone(playerid, zoneid);
forward OnPlayerLeavePlayerGangZone(playerid, zoneid);
forward OnPlayerPickUpPlayerPickup(playerid, pickupid);
forward OnPlayerPauseStateChange(playerid, pausestate);
forward OnPlayerStatsAndWeaponsUpdate(playerid);
forward OnRemoteRCONPacket(const ipaddr[], port, const password[], success, const command[]);
forward OnServerMessage(const msg[]);
forward OnPlayerClientGameInit(playerid, &usecjwalk, &limitglobalchat, &Float:globalchatradius, &Float:nametagdistance, &disableenterexits, &nametaglos, &manualvehengineandlights,
&spawnsavailable, &shownametags, &showplayermarkers, &onfoot_rate, &incar_rate, &weapon_rate, &lacgompmode, &vehiclefriendlyfire);
forward OnOutcomeScmEvent(playerid, issuerid, E_SCM_EVENT_TYPE:eventid, vehicleid, arg1, arg2);
forward OnServerQueryInfo(const ipaddr[], hostname[51], gamemode[31], language[31]);
forward OnSystemCommandExecute(const line_output[], retval, index, success, line_current, line_total);
//////////////////////////////////////////////////////////////
// Fixes
//////////////////////////////////////////////////////////////
// No comment..
#if !defined IsValidVehicle
native IsValidVehicle(vehicleid);
#endif
#if !defined GetGravity
native Float:GetGravity();
#endif
#if !defined GetWeather
#define GetWeather() GetConsoleVarAsInt("weather")
#endif
native GetWeaponSlot(weaponid);
enum
{
BS_BOOL,
BS_CHAR,
BS_UNSIGNEDCHAR,
BS_SHORT,
BS_UNSIGNEDSHORT,
BS_INT,
BS_UNSIGNEDINT,
BS_FLOAT,
BS_STRING
};
// Developer functions
native SendRPC(playerid, RPC, {Float,_}:...); // playerid == -1 -> broadcast
native SendData(playerid, {Float,_}:...); // playerid == -1 -> broadcast
/* EXAMPLE
CMD:pickup(playerid, params[])
{
new
Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SendRPC(playerid, 95, // rpcid
BS_INT, strval(params), // int - pickupid
BS_INT, 1222, // int - modelid
BS_INT, 19, // int - type
BS_FLOAT, X + 2.0, // float
BS_FLOAT, Y, // float
BS_FLOAT, Z); // float
return 1;
}
CMD:destroypickup(playerid, params[])
{
SendRPC(playerid, 63, // rpcid
BS_INT, strval(params)); // int - pickupid
return 1;
}
*/
|
CAn someone give me dutils without theese errors
and whats wrong with YSF,inc? |