SA-MP Forums Archive
Convert this to strmp - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Convert this to strmp (/showthread.php?tid=276184)



Convert this to strmp - Alex_Obando - 12.08.2011

pawn Код:
CMD:ekk(playerid, params[])
{
        new id, reason[124], string[128], name[24];
        if(sscanf(params[], "us[128]", id)) return SendClientMessage(playerid, RED, "Usage: /ekk [id] [reason]");
        if(adminlevel[playerid] >  2)
        {
                if(GetPlayerVirtualWorld(id) != 9) return SendClientMessage(playerid, RED, "Player is not in DDay!");
                SetPlayerVirtualWorld(playerid, 0);
                GetPlayerName(id, name, 24);
                format(string, sizeof string, "%s has been kicked from the DDay event for %s",name,reason);
                SendClientMessageToAll(RED, string);
        }
        else return SendClientMessage(playerid, RED, "You can't use this!");
        return 1;
}



Re: Convert this to strmp - MadeMan - 12.08.2011

Why?


AW: Convert this to strmp - samtey - 12.08.2011

PHP код:
if(!strcmp(cmdtext"/ekk"true4)) 
       new 
idreason[124], string[128], name[24];
        if(
sscanf(params[], "us[128]"id)) return SendClientMessage(playeridRED"Usage: /ekk [id] [reason]");
        if(
adminlevel[playerid] >  2)
        {
                if(
GetPlayerVirtualWorld(id) != 9) return SendClientMessage(playeridRED"Player is not in DDay!");
                
SetPlayerVirtualWorld(playerid0);
                
GetPlayerName(idname24);
                
format(stringsizeof string"%s has been kicked from the DDay event for %s",name,reason);
                
SendClientMessageToAll(REDstring);
        }
        else return 
SendClientMessage(playeridRED"You can't use this!");
        return 
1
}


Re: Convert this to strmp - Michael@Belgium - 12.08.2011

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
Why?
Don't ask just do it just like samtey


Respuesta: Re: Convert this to strmp - Alex_Obando - 12.08.2011

Quote:
Originally Posted by Michael@Belgium
Посмотреть сообщение
Don't ask just do it just like samtey
+1 Reputation for your comment.


AW: Convert this to strmp - samtey - 12.08.2011

Wtf, sometimes I really dunno why I am doing something!

I made you the whole thing and instead of giving me a rep you give him?^^

Nothing against you, Michael!


Re: Respuesta: Re: Convert this to strmp - Michael@Belgium - 12.08.2011

Quote:
Originally Posted by Alex_Obando
Посмотреть сообщение
+1 Reputation for your comment.
Lol Thanks

EDIT:


Quote:
Originally Posted by samtey
Посмотреть сообщение
Wtf, sometimes I really dunno why I am doing something!

I made you the whole thing and instead of giving me a rep you give him?^^

Nothing against you, Michael!
np


Respuesta: Convert this to strmp - Alex_Obando - 12.08.2011

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/ekk", true, 4))
       new id, reason[124], string[128], name[24];
        if(sscanf(params[], "us[128]", id)) return SendClientMessage(playerid, RED, "Usage: /ekk [id] [reason]");
        if(adminlevel[playerid] >  2)
        {
                if(GetPlayerVirtualWorld(id) != 9) return SendClientMessage(playerid, RED, "Player is not in DDay!");
                SetPlayerVirtualWorld(playerid, 0);
                GetPlayerName(id, name, 24);
                format(string, sizeof string, "%s has been kicked from the DDay event for %s",name,reason);
                SendClientMessageToAll(RED, string);
        }
        else return SendClientMessage(playerid, RED, "You can't use this!");
        return 1;
        {
       
       
    return 0;
}
pawn Код:
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(92) : error 003: declaration of a local variable must appear in a compound block
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(92) : warning 217: loose indentation
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(92) : error 017: undefined symbol "id"
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(92) : warning 215: expression has no effect
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(92) : error 001: expected token: ";", but found "]"
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(92) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.



Re: Convert this to strmp - Snipa - 12.08.2011

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/ekk", true, 4)) {
        new id, reason[124], string[128], name[24];
        if(sscanf(params[], "us[128]", id)) return SendClientMessage(playerid, RED, "Usage: /ekk [id] [reason]");
        if(adminlevel[playerid] >  2)
        {
                if(GetPlayerVirtualWorld(id) != 9) return SendClientMessage(playerid, RED, "Player is not in DDay!");
                SetPlayerVirtualWorld(playerid, 0);
                GetPlayerName(id, name, 24);
                format(string, sizeof string, "%s has been kicked from the DDay event for %s",name,reason);
                SendClientMessageToAll(RED, string);
        }
        else return SendClientMessage(playerid, RED, "You can't use this!");
        return 1;
    }
    return 0;
}



Respuesta: AW: Convert this to strmp - Alex_Obando - 12.08.2011

Quote:
Originally Posted by samtey
Посмотреть сообщение
Wtf, sometimes I really dunno why I am doing something!

I made you the whole thing and instead of giving me a rep you give him?^^

Nothing against you, Michael!
It didnt worked, +1 Rep anyway :P