Help with command
#1

Hi, I have a problem with a lot of commands. Happens that if you type for example "/slap" the command runs good, but in one part say "Unknown command", I don't know why happen that.
So, here's the command
pawn Код:
COMMAND:slap(playerid,params[])
{
    if(Informacion[playerid][Admin] >= 2)
    {
        new id;
        if(sscanf(params,"u",id))
        {
            if(Informacion[id][Idioma]==0) SendClientMessage(playerid,-1,"Usa: {FF0000}/bofetear {FFFFFF}[ID/Nombre]");
            if(Informacion[id][Idioma]==1) SendClientMessage(playerid,-1,"Use: {FF0000}/slap {FFFFFF}[ID/Name]");
            return 1;
        }
        if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"Jugador no conectado");
        new Float:X,Float:Y,Float:Z;
        GetPlayerPos(id,X,Y,Z);
        SetPlayerPos(id,X,Y,Z+15);
        GameTextForPlayer(id,"~r~SLAP!",5000,4);
        new st[128 char];
        format(st,128,"Has bofeteado a {FF0000}%s (%d)",pNick(id),id);
        SendClientMessage(playerid,-1,st); //all is good here - the message is displayed
        PlayerPlaySound(id,1190,0.0,0.0,0.0); //HERE IS THE PROBLEM. No sound is played
    }
    return 1;
}
That happen with another command too (/are - accept report)

Sorry for the English, I'm learning.
Reply


Messages In This Thread
Help with command - by godoy32 - 25.03.2012, 22:31
Re: Help with command - by Twisted_Insane - 25.03.2012, 23:19
Respuesta: Re: Help with command - by godoy32 - 25.03.2012, 23:41
Re: Help with command - by Reklez - 26.03.2012, 01:34
Re: Help with command - by [HiC]TheKiller - 26.03.2012, 05:32

Forum Jump:


Users browsing this thread: 1 Guest(s)