08.04.2017, 12:52
PHP Code:
CMD:laptop(playerid, params[])
{
if(PlayerInfo[playerid][pLaptop] == 0) return SCM(playerid, COLOR_GREY, "Nu ai un laptop!");
new cmd[256],tmp[256];
cmd = strtok(cmdtext, idx);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_SERVER, "USAGE:{FFFFFF} /laptop [on/off]");
if(strcmp("on", tmp, true, strlen(tmp)) == 0)
{
PlayerInfo[playerid][pLaptopStatus] = 0;
}
else if(strcmp("off", tmp, true, strlen(tmp)) == 0)
{
PlayerInfo[playerid][pLaptopStatus] = 1;
}
return 1;
}