Skin help with cmd REP + - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Skin help with cmd REP + (
/showthread.php?tid=365810)
Skin help with cmd REP + -
Dare Devil..... - 04.08.2012
Hello This is my command hos can change it that when a player go /guarduty off his skin comes to be what he had last time instead off 101
pawn Код:
YCMD:guardduty(playerid, params[]) {
if(isnull(params))
return SendClientMessage(playerid, -1, "Type /guardduty [ON|OFF]");
static
playerName[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][SFCS] == 0) return 1;
if(!strcmp(params, "ON", true)) {
GetPlayerName(playerid, playerName, sizeof playerName);
SetPVarString(playerid, "name", playerName);
SetPlayerSkin(playerid,0);
SetPlayerColor(playerid,0xFFA100FF);
new string[126];
format(string, sizeof(string), "%s changes his clothes for duty", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
if(!strcmp(params, "OFF", true)) {
SetPlayerSkin(playerid,101);
SetPlayerColor(playerid,0xFFFFFF00);
new string[126];
format(string, sizeof(string), "%s changes his clothes for going offduty", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
}
return 1;
}
Re: Skin help with cmd REP + -
Faisal_khan - 04.08.2012
Get the players skin, save it in enum then set the skin on gaurdduty off.
Re: Skin help with cmd REP + -
Dare Devil..... - 04.08.2012
Can you tell it in a better way its barely understandable.
pawn Код:
enum pInfo
{
Password,
Admin,
Origin,
Gender,
Age,
Float:sPosX,
Float:sPosY,
Float:sPosZ,
Float:sPosA,
Float:sHealth,
Float:sArmor,
Money,
BankBalance,
BankPin,
Cellphone,
HouseID,
CarID,
Gun1,
Gun2,
Gun3,
Gun4,
Gun5,
Gun6,
Gun7,
Gun8,
Gun9,
Gun10,
Gun11,
Gun12,
Gun13,
WTChannel,
Faction,
FLeader,
Job,
sInterior,
sVW,
Skin,
Muted,
nMute,
Helper,
Developer,
Wolf,
SFCS,
SFCMS,
RentingID,
FRank,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
My enum info