Bad code, help me
#1

Hey, i want to ask one question. I want to made a /leavejob <reason>

And i want to write all server job's(where i'm join): Name_SubName leave job reason: test.

This code:

Код:
CMD:leavejob(playerid, params[])
{
	new reason,STRING[150];
    if(sscanf(params, "u", reason)) return SendClientMessage(playerid, COLOR_RED, "* Using: /leavejob [reason]");
    
    if(spec[ playerid ] == 0) return SendClientMessage(playerid, COLOR_RED, "* Nothing to leave");
    if(spec[ playerid] == POLICE)
    {
    format(String[ playerid ], 150,"%s leave job reason: %s",GetPlayerNameEx[playerid], reason);
    SendMessageToPolice( playerid, COLOR_ORANGE,String[ playerid ]);
    }
    else if(spec[ playerid ] == MEDIC)
    {
        format(STRING,128,"%s leave job reason:%s", GetPlayerNameEx[ playerid ], reason);
        SendMessageToMedics( playerid, COLOR_ORANGE,String[ playerid ]);
    }
    SetPlayerSkin( playerid, UNIFORMS[ playerid ] );
    spec[ playerid ]=0;
    UNIFORMA[ playerid ]=-1;
    UNIFORMD[ playerid ]=false;
    GIVEPLAYERCOLORFROMFROFFESION( playerid );
    SetPlayerSkin( playerid, UNIFORMS[ playerid ] );
    UNIFORMD[ playerid ] = false;
    ApplyAnimation(playerid,"PLAYIDLES","stretch",4.1,0,0,0,0,0);
    SendClientMessage(playerid,COLOR_RED,"* Leaved");
	ZERORANGS( playerid );
	return 1;
}
AND when i write /leavejob test he said Nick_Subname leave job reason: 65535 or nothing.
Reply


Messages In This Thread
Bad code, help me - by PaskaV - 17.01.2016, 17:56
Re: Bad code, help me - by Pottus - 17.01.2016, 18:06
Re: Bad code, help me - by PaskaV - 17.01.2016, 18:18
Respuesta: Re: Bad code, help me - by IzadorO - 17.01.2016, 20:26

Forum Jump:


Users browsing this thread: 2 Guest(s)