09.12.2011, 15:24
I've tryed to make an /setname command, it worked but I want it to save the data. Like I've done 10 missions, in the new file it must save those data either. If someone could make that would be awesome.
path to userfiles: /scriptfiles/ServerData/Players/
Current code:
Could someone do that for me?
PS. If u need some specific data ask me here.
path to userfiles: /scriptfiles/ServerData/Players/
Current code:
pawn Код:
COMMAND:changename(playerid,params[])
{
new OtherPlayer12, Msg12[170], Name12[24], Message12[150], OtherPlayerName12[24];
SendAdminText(playerid,"/changename", params);
if (APlayerData[playerid][PlayerLevel] < 5) return SendClientMessage(playerid, 0xFFFFFFFF, "[ERROR]: You don't have access!");
else if(sscanf(params, "rs[170]", OtherPlayer12, Message12)) return SendClientMessage(playerid,0xFFFFFFFF, "SYNTAX: /changename <name/id> <newname>");
GetPlayerName(playerid, Name12, sizeof(Name12));
GetPlayerName(OtherPlayer12, OtherPlayerName12, sizeof(OtherPlayerName12));
format(Msg12, sizeof(Msg12), "{FF6600}%s {FFFFFF}has changed {FF6600}%s {FFFFFF}his name to: {FF6600}%s", Name12, OtherPlayerName12, Message12);
SendClientMessageToAll(0xFFFFFFFF, Msg12);
SetPlayerName(OtherPlayer12, Message12);
return 1;
}
PS. If u need some specific data ask me here.