SA-MP Forums Archive
[GameMode] Bgtracker's DM Gamemode V1 - 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: Gamemode Scripts (https://sampforum.blast.hk/forumdisplay.php?fid=71)
+--- Thread: [GameMode] Bgtracker's DM Gamemode V1 (/showthread.php?tid=282416)



Bgtracker's DM Gamemode V1 - N.K.Stallone - 10.09.2011

REMOVED


Re : Bgtracker's DM Gamemode V1 - Naruto_Emilio - 10.09.2011

Nothing perfect, but good for a newbie scripter + put an pastebin link


Re: Re : Bgtracker's DM Gamemode V1 - N.K.Stallone - 10.09.2011

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
Nothing perfect, but good for a newbie scripter + put an pastebin link
Ok no problem one second.


Re : Bgtracker's DM Gamemode V1 - Naruto_Emilio - 11.09.2011

The script is tottally fucked, you are always putting return 1; in every place
example:
pawn Код:
if (strcmp("/checkmyteam", cmdtext, true) == 0)
    {
        if(pTeam[playerid] == team_lspd){
            SendClientMessage(playerid, COLOR_YELLOW , "You are LSPD officer !");
                return 1;
        }
                if(pTeam[playerid] == team_gang){
            SendClientMessage(playerid, COLOR_YELLOW , "You are a Gangster you need to be careful about cops !");
                return 1;
        }
                return 1;
        }
pawn Код:
if (strcmp("/checkmyteam", cmdtext, true) == 0)
    {
        if(pTeam[playerid] == team_lspd)
        {
            SendClientMessage(playerid, COLOR_YELLOW , "You are LSPD officer !");
        }

        else if(pTeam[playerid] == team_gang)
        {
            SendClientMessage(playerid, COLOR_YELLOW , "You are a Gangster you need to be careful about cops !");
        return 1;
        }

and
pawn Код:
if (strcmp("/repair", cmdtext, true) == 0)
        {
                if(!IsPlayerInAnyVehicle(playerid)){
                SendClientMessage(playerid, COLOR_GREEN , "You need to be in a vehicle to use the /repair command.");
                return 1;
        }
 
                new vehicleid = GetPlayerVehicleID(playerid);
                new string[128];
                format(string, sizeof(string), "You repaired Vehicle ID: %d", vehicleid);
                SendClientMessage(playerid, COLOR_GREEN , string);
                RepairVehicle(vehicleid);
                return 1;
        }
To
pawn Код:
if (strcmp("/repair", cmdtext, true) == 0)
        {
                if(!IsPlayerInAnyVehicle(playerid))
        {
                SendClientMessage(playerid, COLOR_GREEN , "You need to be in a vehicle to use the /repair command.");
        }
        else
        {

                new vehicleid = GetPlayerVehicleID(playerid);
                new string[128];
                format(string, sizeof(string), "You repaired Vehicle ID: %d", vehicleid);
                SendClientMessage(playerid, COLOR_GREEN , string);
                RepairVehicle(vehicleid);
        }
                return 1;
        }



Re: Re : Bgtracker's DM Gamemode V1 - N.K.Stallone - 11.09.2011

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
The script is tottally fucked, you are always putting return 1; in every place
example:
pawn Код:
if (strcmp("/checkmyteam", cmdtext, true) == 0)
    {
        if(pTeam[playerid] == team_lspd){
            SendClientMessage(playerid, COLOR_YELLOW , "You are LSPD officer !");
                return 1;
        }
                if(pTeam[playerid] == team_gang){
            SendClientMessage(playerid, COLOR_YELLOW , "You are a Gangster you need to be careful about cops !");
                return 1;
        }
                return 1;
        }
pawn Код:
if (strcmp("/checkmyteam", cmdtext, true) == 0)
    {
        if(pTeam[playerid] == team_lspd)
        {
            SendClientMessage(playerid, COLOR_YELLOW , "You are LSPD officer !");
        }

        else if(pTeam[playerid] == team_gang)
        {
            SendClientMessage(playerid, COLOR_YELLOW , "You are a Gangster you need to be careful about cops !");
        return 1;
        }

and
pawn Код:
if (strcmp("/repair", cmdtext, true) == 0)
        {
                if(!IsPlayerInAnyVehicle(playerid)){
                SendClientMessage(playerid, COLOR_GREEN , "You need to be in a vehicle to use the /repair command.");
                return 1;
        }
 
                new vehicleid = GetPlayerVehicleID(playerid);
                new string[128];
                format(string, sizeof(string), "You repaired Vehicle ID: %d", vehicleid);
                SendClientMessage(playerid, COLOR_GREEN , string);
                RepairVehicle(vehicleid);
                return 1;
        }
To
pawn Код:
if (strcmp("/repair", cmdtext, true) == 0)
        {
                if(!IsPlayerInAnyVehicle(playerid))
        {
                SendClientMessage(playerid, COLOR_GREEN , "You need to be in a vehicle to use the /repair command.");
        }
        else
        {

                new vehicleid = GetPlayerVehicleID(playerid);
                new string[128];
                format(string, sizeof(string), "You repaired Vehicle ID: %d", vehicleid);
                SendClientMessage(playerid, COLOR_GREEN , string);
                RepairVehicle(vehicleid);
        }
                return 1;
        }
Dude thanks for the points but i know how to do it.
The script compiles fine and is working fine the way i make it.


Re: Bgtracker's DM Gamemode V1 - omribobi5 - 16.06.2013

Thanks