Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock UcitajHeli(playerid)
- {
- new dateiname[128+4];
- new playername[MAX_PLAYER_NAME+100];
- Helist[playerid][HTyp]=-1; Helist[playerid][HEX]=0.0; Helist[playerid][HEY]=0.0; Helist[playerid][HEZ]=0.0;
- Helist[playerid][HRotation]=0.0; Helist[playerid][HLock]=0; Helist[playerid][HCarid]=-1;
- Helist[playerid][HColor1]=-1; Helist[playerid][HColor2]=-1;
- HeliSpectating[playerid][0]=-1;
- GetPlayerName(playerid, playername, sizeof(playername));
- format(dateiname, sizeof(dateiname), "Bicikle/%s.bi", playername);
- if (fexist(dateiname))
- {
- new File: HeliFile = fopen(dateiname, io_read);
- if ( HeliFile )
- {
- new key[ 256 ];
- new Data[ 256 ], val[ 256 ];
- while ( fread( HeliFile , Data , sizeof( Data ) ) )
- {
- key = ini_GetKey(Data);
- if(strcmp(key,"AH_Typ",true)==0) { Helist[playerid][HTyp]=strval(ini_GetValue(Data)); }
- else if(strcmp(key,"AH_Hmodel",true)==0) { Helist[playerid][HModel]=strval(ini_GetValue(Data)); }
- else if(strcmp(key ,"AH_HVlasnik",true)== 0) { val = ini_GetValue( Data ); strmid(Helist[playerid][HVlasnik], val, 0, strlen(val)-1, 255); }
- else if(strcmp(key,"AH_HVlasnik",true)==0) { Helist[playerid][HVlasnik]=strlen(ini_GetValue(Data)); }
- else if(strcmp(key,"AH_HCijena",true)==0) { Helist[playerid][HCijena]=strval(ini_GetValue(Data)); }
- else if(strcmp(key,"AH_HX",true)==0) { Helist[playerid][HEX]=floatstr(ini_GetValue(Data)); }
- else if(strcmp(key,"AH_HY",true)==0) { Helist[playerid][HEY]=floatstr(ini_GetValue(Data)); }
- else if(strcmp(key,"AH_HZ",true)==0) { Helist[playerid][HEZ]=floatstr(ini_GetValue(Data)); }
- else if(strcmp(key,"AH_Rot",true)==0) { Helist[playerid][HRotation]=floatstr(ini_GetValue(Data)); }
- else if(strcmp(key,"AH_HLock",true)==0) { Helist[playerid][HLock]=strval(ini_GetValue(Data)); }
- else if(strcmp(key,"AH_HColor1",true)==0) { Helist[playerid][HColor1]=strval(ini_GetValue(Data)); }
- else if(strcmp(key,"AH_HColor2",true)==0) { Helist[playerid][HColor2]=strval(ini_GetValue(Data)); }
- }
- }
- fclose(HeliFile);
- if(Helist[playerid][HTyp]!=-1)
- {
- Helist[playerid][HCarid]=CreateTunedHeli(playerid);
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment