Server crash if anyone type /skin higher than 299
#1

Plase,can you help me ?
If anyone type /skin ex. 301, my server crash, and i must restart it.
Can you tell me, how to fix it ?
I think, some must exist, to lock skins only 0 to 299
//Edit :
And, if i login in my server as Admin (from /rcon login password).
Its sending some text about vehicle to chat
Pic :
Reply
#2

Please sshow us your skin comand.
Reply
#3

Its in main test_cmds :

if(strcmp(cmd, "/skin", true) == 0) {
new tmp[256];
tmp = strtok(cmdtext,idx);
SetPlayerSkin(playerid,strval(tmp));
return 1;
}
Reply
#4

Skin 301 does not exist
Reply
#5

PHP код:
if(strcmp(cmd"/setskin"true) == 0
    {
        new 
tmp[256];
        
tmp strtok(cmdtext,idx);
        if(
strval(tmp) > 299 || strval(tmp) < 0) return SendClientMessage(playerid, -1,"That skin does not exists");
        
SetPlayerSkin(playerid,strval(tmp));
        return 
1;
    } 
Reply
#6

Fixed

pawn Код:
if(strcmp(cmd, "/setskin", true) == 0)
    {
        new tmp[256];
        tmp = strtok(cmdtext,idx);
        if(strval(tmp) >= 0 || strval(tmp) <= 299) return SendClientMessage(playerid, -1,"That skin does not exist");
        SetPlayerSkin(playerid,strval(tmp));
        return 1;
    }
id 0 and id 299 still exists
Reply
#7

Quote:
Originally Posted by Pinguinn
Посмотреть сообщение
Fixed

pawn Код:
if(strcmp(cmd, "/setskin", true) == 0)
    {
        new tmp[256];
        tmp = strtok(cmdtext,idx);
        if(strval(tmp) >= 0 || strval(tmp) <= 299) return SendClientMessage(playerid, -1,"That skin does not exist");
        SetPlayerSkin(playerid,strval(tmp));
        return 1;
    }
id 0 and id 299 still exists
Lol yea and you blocked that too.
Reply
#8

Jafet_Macario : Really nice ! Many thanks to you
So, i tested version from Pinguinn, and its always type to chat : "That skin does not exist"
Anyone doesnґt know, why if i login as admin, in chat shows something about VehicleUpdate ?
Reply
#9

Dont just copy script, try to understand it :S

pawn Код:
if(strcmp(cmd, "/setskin", true) == 0)
    {
        new tmp[256];
        tmp = strtok(cmdtext,idx);
        if(strval(tmp) < 0 || strval(tmp) > 299) return SendClientMessage(playerid, -1,"That skin does not exist");
        SetPlayerSkin(playerid,strval(tmp));
        return 1;
    }
Reply
#10

Yeah, i know it. But i need help with my 2nd request :

This text shows, if i loged as admin by /rcon login password
Can you help me ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)