- 0
Don't send pawno
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Daniel_Dani
Am adaugat in GM astea pentru a salva wantedul dupa relog. Iar cand compilez imi da don't send la pawno.. aveti idee de ce?
[pawn]#define USER_WANTED_FOLDER "Users/Wanted/%s"
public OnPlayerDisconnect(playerid, reason){
new WantedLevel = GetPlayerWantedLevel(playerid);
new string[256];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), USER_WANTED_FOLDER, pName);
if(!dini_Exists(string)){
dini_Create(string);
dini_Set(string, "WantedLevel", WantedLevel);
}else{
dini_Set(string, "WantedLevel", WantedLevel);
}
return 1;
}[/pawn]
[pawn]public OnPlayerConnect(playerid){
new string[256];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), USER_WANTED_FOLDER, pName);
if(dini_Exists(string)){
new WantedLevel = dini_Set(string, "WantedLevel", WantedLevel);
SetPlayerWantedLevel(playerid, WantedLevel);
}
return 1;
}[/pawn]
4 answers to this question
Recommended Posts