jeudi 7 août 2014

Get Strings in file and connect it to other file

Sorry for bad English

I want to do this:

Get String from pFile (btw this line is error line... i think i need to add strcmp or something)


pawn Code:




DOF2_GetString(pFile(playerid),"Clan");





then its will Get the String "Clan = X" from pFile and I want to make cFile as "Clan"'s String (Clan = X)

so X will be the cFile


pawn Code:




DOF2_GetString(cFile(playerid),"Color");





now i got "Color = 0xFF0000FF" at cFile file

so I want to do:

OnPlayerSpawn

SetPlayerColor(playerid,DOF2_GetString(cFile(playe rid),"Color");



my stocks:




pawn Code:




stock pFile(playerid)

{

new pName[MAX_PLAYER_NAME +1];

new File[50];

GetPlayerName(playerid,pName,MAX_PLAYER_NAME);

format(File,sizeof(File),"Accounts/%s.ini",pName);

return File;

}






pawn Code:




stock cFile(playerid)

{

new File[50];

format(File,sizeof(File),"Clans/%s.ini",cString);

SetPlayerScore(playerid,0);

return File;

}





Please help




Aucun commentaire:

Enregistrer un commentaire