20.05.2017, 10:31
Hey,
wondering why this isn't working and what I'm doing wrong? It sets to 0 by default and you can't pick the style.
wondering why this isn't working and what I'm doing wrong? It sets to 0 by default and you can't pick the style.
PHP Code:
CMD:setstyle(playerid, params[])
{
new
options, chatstyle, walkstyle;
if(sscanf(params, "d", options)) {
SendClientMessage(playerid, ADM, "USAGE:{FFFFFF} /setstyle [Options]");
SendClientMessage(playerid, DARKGREEN, "1. Chat Style|2. Walk Style");
return 1;
}
switch(options)
{
case 1:
{
if(sscanf(params, "d", chatstyle)){
SendClientMessage(playerid, DARKGREEN, "USAGE: /setstyle 1 [StyleID 0-7]");
return 1;
}
if(chatstyle < 0 || chatstyle > 7)
return SendClientMessage(playerid, DARKGREEN, "That chatstyle does not exist.");
PlayerData[playerid][ChatStyle] = chatstyle;
SendClientMessage(playerid, YELLOW, "Your chatstyle has been updated. Chat styles are played when you type.");
}
}
return 1;
}