18.09.2013, 21:44
me and a friend of mine are making a gamemode but he started with dcmd instead of zcmd... the problem is i tried to use it to modify some stuff I get no errors although IG it says Unknown:Command
The command was defined here
in this list with alot of other cmds then over here
I get no errors in any of this code but the command isnt recognzied IG the only thing I changed was removing the 3 VIP levels and adding just 1 i removed any traces of the other vip levels and made it only fit to 1 the saving and the setvip cmd writes into the files as VIP=1 so its working is it because of the "=="? Before i had >= because of the other levels but if I put only = 1 it will give a error unintended something .
The command was defined here
Код:
dcmd(dskin,5,cmdtext);
Код:
dcmd_dskin(playerid, params[])
{
new skin;
if(PlayerInfo[playerid][VIP] == 1) return 0;
if(sscanf(params,"i",skin)) return SendClientMessage(playerid,COLOR_CMDUSAGE,"USAGE: /dskin [SkinID]");
if(!IsValidSkin(skin)) return SendClientMessage(playerid,COLOR_RED,"[ERROR]Invalid skinID");
SendClientMessage(playerid, -1, "You have successfully changed your skin.");
dini_IntSet(Pos(playerid),"Skin",skin);
SetPlayerSkin(playerid,skin);
SetPlayerColor(playerid, COLOR_VIPPURPLE);
return 1;
}


