#1

how can i check if there is something in file? like... "Armor=100"...
Reply
#2

SetPlayerArmour(playerid, 100)

Find it
Reply
#3

Quote:
Originally Posted by wheelman_WM
Посмотреть сообщение
SetPlayerArmour(playerid, 100)

Find it
That does set the players health.. it does not read an file to check what ever the int is stored as.

Give me an sec i'll give you an example how to check.

pawn Код:
stock GetPlayerIntFromFile(playerid, Info[])
{
     new pFile[50]; format(pFile, sizeof(pFile), "./Accounts/%s.file", GetPlayerNameEx(playerid));
     return dini_Int(pFile, Info);
}

stock GetPlayerNameEx(playerid)
{
     new pName[25];
     GetPlayerName(playerid, pName, sizeof(pName));
     return pName;
}
Example:

pawn Код:
SetPlayerHealth(playerid, GetPlayerIntFromFile(playerid, "Health"));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)