SA-MP Forums Archive
Convert to STRCMP PLease - 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)
+--- Thread: Convert to STRCMP PLease (/showthread.php?tid=446026)



Convert to STRCMP PLease - San1 - 24.06.2013

I need it converted to STRCMP for another script cuz it uses STRCMP
Dont question me just please convert it

pawn Код:
CMD:playall(playerid, params[])
{
    if(PlayerInfo[playerid][pDJ] < 1) return SendClientMessage(playerid, COLOR_WHITE, "DJ Only Command");
    if(isnull(params))return SendClientMessage(playerid, -1, "/playall [url]");
    for(new i = 0; i < MAX_PLAYERS; i ++)
    {
        PlayAudioStreamForPlayer(i, params);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can stop playing this song with /stopall");
        SendClientMessageToAll(COLOR_LIGHTBLUE, "An DJ has started playing a song (use /stopaudio to stop this song for you");
    }
    return 1;
}

CMD:stopall(playerid, params[])
{
    if(PlayerInfo[playerid][pDJ] < 1) return SendClientMessage(playerid, COLOR_WHITE, "DJ Only Command");
    for(new i = 0; i < MAX_PLAYERS; i ++)
    {
        StopAudioStreamForPlayer(i);
        SendClientMessageToAll(COLOR_LIGHTBLUE, "An DJ has stopped playing the song");
    }
    return 1;
}

CMD:djhelp(playerid, params[])
{
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "DJ COMMANDS:{FFFFFF}/playall /stopall");
    return 1;
}

CMD:audiostop(playerid, params[])
{
    StopAudioStreamForPlayer(playerid);
    return 1;
}



Re: Convert to STRCMP PLease - [ABK]Antonio - 24.06.2013

pawn Код:
if(!strcmp(cmdtext, "mycommandhere", true))
+
Select all and press tab

Really isn't to difficult =/


Re: Convert to STRCMP PLease - CountyRP - 24.06.2013

pawn Код:
if(!strcmp(cmdtext, "/playall", true))
{
    if(PlayerInfo[playerid][pDJ] < 1) return SendClientMessage(playerid, COLOR_WHITE, "DJ Only Command");
    if(isnull(params))return SendClientMessage(playerid, -1, "/playall [url]");
    for(new i = 0; i < MAX_PLAYERS; i ++)
    {
        PlayAudioStreamForPlayer(i, params);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can stop playing this song with /stopall");
        SendClientMessageToAll(COLOR_LIGHTBLUE, "An DJ has started playing a song (use /stopaudio to stop this song for you");
    }
    return 1;
}
if(!strcmp(cmdtext, "/stopall", true))
{
    if(PlayerInfo[playerid][pDJ] < 1) return SendClientMessage(playerid, COLOR_WHITE, "DJ Only Command");
    for(new i = 0; i < MAX_PLAYERS; i ++)
    {
        StopAudioStreamForPlayer(i);
        SendClientMessageToAll(COLOR_LIGHTBLUE, "An DJ has stopped playing the song");
    }
    return 1;
}
if(!strcmp(cmdtext, "/djhelp", true))
{
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "DJ COMMANDS:{FFFFFF}/playall /stopall");
    return 1;
}

if(!strcmp(cmdtext, "/audiostop", true))
{
    StopAudioStreamForPlayer(playerid);
    return 1;
}



Re: Convert to STRCMP PLease - Vince - 24.06.2013

It's funny how no one takes cares of the 'params'.
Quote:
Originally Posted by San1
Посмотреть сообщение
I need it converted to STRCMP for another script cuz it uses STRCMP
Dont question me just please convert it
Wrong approach. Convert the other script to ZCMD instead of the other way round.