Please Help me :'(
#5

To fix the 1є error, put this on the top of the Gamemode/FS or before the Public:

pawn Код:
forward DisableGod(playerid);
To fix the 2є error:

Rename the "info" string that you use in the dialog the pickup name and the string have the same name, that's what's causing the error...

To fix the cmd error:

You need to use the function GetPlayerName. (I already inserted the function into your cmd)

pawn Код:
CMD:tune(playerid, params[])
{
    if(isnull(params))
    {
        SendClientMessage(playerid, red, " Usage: /tune [1-4] ");
        SendClientMessage(playerid, red, " FUNCTION: To Teleport To The Tune Garages ");
        return 1;
    }
    else
    {
        switch(strval(params))
        {
            case 1:
            {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    SetVehiclePos(GetPlayerVehicleID(playerid), -1935.985, 231.728, 34.1546);
                }
                else
                {
                    SetPlayerPos(playerid, -1935.985, 231.728, 34.1546);
                }

                new dsname[MAX_PLAYER_NAME];
                new string[182];
                GetPlayerName(playerid, dsname, sizeof(dsname));
                format(string, sizeof(string), "%s has just teleported to Tune 1 /Tune 1", dsname);
                SendClientMessageToAll(COLOR_YELLOW, string);
                GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 1", 3000, 4);
                return 1;
            }
            case 2:
            {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    SetVehiclePos(GetPlayerVehicleID(playerid), -2709.731, 217.423, 4.179);
                }
                else
                {
                    SetPlayerPos(playerid, -2709.731, 217.423, 4.179);
                }

                new dsname[MAX_PLAYER_NAME];
                new string[182];
                GetPlayerName(playerid, dsname, sizeof(dsname));
                format(string, sizeof(string), "%s has just teleported to Tune 2 /Tune 2", dsname);
                SendClientMessageToAll(COLOR_YELLOW, string);
                GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 2", 3000, 4);
                return 1;
            }
            case 3:
            {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    SetVehiclePos(GetPlayerVehicleID(playerid), 2386.802, 1036.320, 10.280);
                }
                else
                {
                    SetPlayerPos(playerid, 2386.802, 1036.320, 10.280);
                }

                new dsname[MAX_PLAYER_NAME];
                new string[182];
                GetPlayerName(playerid, dsname, sizeof(dsname));
                format(string, sizeof(string), "%s has just teleported to Tune 1 /Tune 3", dsname);
                SendClientMessageToAll(COLOR_YELLOW, string);
                GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 3", 3000, 4);
                return 1;
            }
            case 4:
            {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    SetVehiclePos(GetPlayerVehicleID(playerid), 2644.976, -2030.903, 13.554);
                }
                else
                {
                    SetPlayerPos(playerid, 2644.976, -2030.903, 13.554);
                }

                new dsname[MAX_PLAYER_NAME];
                new string[182];
                GetPlayerName(playerid, dsname, sizeof(dsname));
                format(string, sizeof(string), "%s has just teleported to Tune 1 /Tune 4", dsname);
                SendClientMessageToAll(COLOR_YELLOW, string);
                GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 4", 3000, 4);
                return 1;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Please Help me :'( - by Windrush - 18.09.2012, 12:50
Re: Please Help me :'( - by xMCx - 18.09.2012, 12:56
Re: Please Help me :'( - by Windrush - 18.09.2012, 13:00
Re: Please Help me :'( - by mamorunl - 18.09.2012, 13:01
Re: Please Help me :'( - by Douglas_prt - 18.09.2012, 13:07
Re: Please Help me :'( - by Windrush - 18.09.2012, 13:24
Re: Please Help me :'( - by mamorunl - 18.09.2012, 13:28
Re: Please Help me :'( - by Windrush - 18.09.2012, 14:06
Re: Please Help me :'( - by mamorunl - 18.09.2012, 15:45

Forum Jump:


Users browsing this thread: 2 Guest(s)