2problems.
#6

Here is the /gautiz command already
Код:
COMMAND:gautiz(playerid, params[])
{
    new
        id = strval(params),
        vehid,
        seat,
        Float:x,
        Float:y,
        Float:z;
        GetPlayerPos(playerid, x, y, z);
    if (PlayerInfo[playerid][gHelper] <= 0) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Рi komanda TIK Padejлjams!", "Gerai", "Uюdaryti");
    if (isnull(params)) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Naudojimas: /gautiz [ID]", "Gerai", "Uюdaryti");
    if(id == playerid) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Kam teleportuotis pas save?", "Gerai", "Uюdaryti");
    if(IsPlayerNPC(id)) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "NPC atsiteleportuoti negalima", "Gerai", "Uюdaryti");
    if(IsPlayerInAnyVehicle(id))
    {
    seat = GetPlayerVehicleSeat(id);
    vehid = GetPlayerVehicleID(id);
    SetVehiclePos(vehid, x+1, y+1, z+1.3);
    PutPlayerInVehicle(id,vehid,seat);
	}else{
    SetPlayerPos(id, x + 1, y + 1, z);
    }
    return 1;
}
ill edit post if i done the /top command.

here it is but i think the bug is that u cant type players name but only id.. for player name use sscanf
Код:
COMMAND:teleportuotis(playerid, params[])
{
    new
        id = strval(params),
        seat,
        vehid,
        Float:x,
        Float:y,
        Float:z;
        GetPlayerPos(id, x, y, z);
    if (PlayerInfo[playerid][gHelper] <= 0) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Рi komanda TIK Padejлjams!", "Gerai", "Uюdaryti");
	if(id == playerid) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Kam teleportuotis pas save?", "Gerai", "Uюdaryti");
    if (isnull(params)) return SukurtiDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Naudojimas: /teleportuotis [ID]", "Gerai", "Uюdaryti");
    if(IsPlayerInAnyVehicle(playerid))
    {
    seat = GetPlayerVehicleSeat(id);
    vehid = GetPlayerVehicleID(id);
    SetVehiclePos(playerid, x+1, y+1, z+1.3);
    PutPlayerInVehicle(playerid,vehid,seat);
	}else{
    SetPlayerPos(playerid, x + 1, y + 1, z);
    }
    return 1;
}
Reply


Messages In This Thread
2problems. - by Gh0sT_ - 03.10.2010, 12:18
Re: 2problems. - by Gh0sT_ - 03.10.2010, 17:04
Re: 2problems. - by Gh0sT_ - 05.10.2010, 19:07
Re: 2problems. - by TheHoodRat - 05.10.2010, 19:17
Re: 2problems. - by Gh0sT_ - 06.10.2010, 11:28
Re: 2problems. - by Mike_Peterson - 06.10.2010, 13:06
Re: 2problems. - by Gh0sT_ - 06.10.2010, 13:29
Re: 2problems. - by Mike_Peterson - 06.10.2010, 13:32

Forum Jump:


Users browsing this thread: 1 Guest(s)