Posts: 303
Threads: 71
Joined: Mar 2011
How do I save skins so whenever someone joins they dont have to select a skin again (btw each civilian skin has the same skill so that doesnt matter).
But when the player is a new player and they register, i want them to go into class selection screen or if they are old player, they press F4 and they die, they can pick class again. How can i do this?
Also, I'm using dudb and zcmd to save my player's info (money, password, etc.)
Posts: 226
Threads: 83
Joined: Mar 2012
Reputation:
0
new skin;
skin = ID SKIN;
SetPlayerSkin(playerid, skin);
PlayerInfo[playerid][pChar] = skin;
Posts: 303
Threads: 71
Joined: Mar 2011
Quote:
Originally Posted by 3RoR
new skin;
skin = ID SKIN;
SetPlayerSkin(playerid, skin);
PlayerInfo[playerid][pChar] = skin;
|
This sounds about right. But which public function do I put it under or do I just leave it outside a function?
Posts: 226
Threads: 83
Joined: Mar 2012
Reputation:
0
Put it on the Skin Selecting When a player choose a skin put it down and edit the "ID SKIN" put the id skin...
if you don't have a skin system, find and call me y will HELP you...
Posts: 303
Threads: 71
Joined: Mar 2011
Quote:
Originally Posted by X_Boy
u need to define the dcmd here it is
PHP код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
|
Yes I know but I'm using ZCMD. Not DCMD.
Quote:
Originally Posted by 3RoR
Put it on the Skin Selecting When a player choose a skin put it down and edit the "ID SKIN" put the id skin...
if you don't have a skin system, find and call me y will HELP you...
|
And check you PM's.
Posts: 303
Threads: 71
Joined: Mar 2011
Quote:
Originally Posted by X_Boy
here zcmd save skin
PHP код:
CMD:saveskin(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 0 && PlayerInfo[playerid][LoggedIn] == 1) {
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: {3CE01B}/saveskin [skinid]");
new string[128], SkinID = strval(params);
if((SkinID == 0)||(SkinID == 7)||(SkinID >= 9 && SkinID <= 41)||(SkinID >= 43 && SkinID <= 64)||(SkinID >= 66 && SkinID <= 73)||(SkinID >= 75 && SkinID <= 85)||(SkinID >= 87 && SkinID <= 118)||(SkinID >= 120 && SkinID <= 148)||(SkinID >= 150 && SkinID <= 207)||(SkinID >= 209 && SkinID <= 264)||(SkinID >= 274 && SkinID <= 288)||(SkinID >= 290 && SkinID <= 299))
{
dUserSetINT(PlayerName2(playerid)).("FavSkin",SkinID);
format(string, sizeof(string), "You have successfully saved this skin (ID %d)",SkinID);
SendClientMessage(playerid,yellow,string);
SendClientMessage(playerid,yellow,"Type: /useskin to use this skin when you spawn or /dontuseskin to stop using skin");
dUserSetINT(PlayerName2(playerid)).("UseSkin",1);
return CMDMessageToAdmins(playerid,"SAVESKIN");
} else return SendClientMessage(playerid, green, "ERROR: Invalid Skin ID");
}
CMD:useskin(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][Level] >= 0 && PlayerInfo[playerid][LoggedIn] == 1) {
dUserSetINT(PlayerName2(playerid)).("UseSkin",1);
SetPlayerSkin(playerid,dUserINT(PlayerName2(playerid)).("FavSkin"));
return SendClientMessage(playerid,yellow,"{3CE01B}Skin now in use");
}
CMD:dontuseskin(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][Level] >= && PlayerInfo[playerid][LoggedIn] == 1) {
dUserSetINT(PlayerName2(playerid)).("UseSkin",0);
return SendClientMessage(playerid,yellow,"{3CE01B}Skin will no longer be used");
}
|
Thank you and I've given you rep but I'm looking for something to automatically save.