/sendto command help?
#7

pawn Код:
CMD:sendto(playerid, params[])
{
    new targetid, loc[32];
    if(sscanf(params, "s[32]u", loc, targetid))
    {
        SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /sendto [location] [playerid/name]");
        SendClientMessage(playerid, 0xFFFFFFAA, "Available Locations: ls, sf");
        return 1;
    }
   
    if(strcmp(loc, "ls", true) == 0))
    {
        if(GetPlayerState(targetid) == 2)
        {
            new veh = GetPlayerVehicleID(targetid);
            SetVehiclePos(veh, 1529.6,-1691.2,13.3);
            LinkVehicleToInterior(veh, 0);
            SetVehicleVirtualWorld(veh, 0);
        }
        else
        {
            SetPlayerPos(targetid, 1529.6,-1691.2,13.3);
        }
        SendClientMessage(targetid, 0xFFFFFFAA, "You have been sent to Los Santos.");
        SetPlayerInterior(targetid,0);
        SetPlayerVirtualWorld(targetid, 0);
    }
    else if(strcmp(loc, "sf", true) == 0))
    {
        if(GetPlayerState(targetid) == 2)
        {
            new veh = GetPlayerVehicleID(targetid);
            SetVehiclePos(veh, -2015.261108, 154.379516, 27.687500);
            LinkVehicleToInterior(veh, 0);
            SetVehicleVirtualWorld(veh, 0);
        }
        else
        {
            SetPlayerPos(targetid, -2015.261108, 154.379516, 27.687500);
        }
        SendClientMessage(targetid, 0xFFFFFFAA, "You have been sent to San Fierro.");
        SetPlayerInterior(targetid,0);
        SetPlayerVirtualWorld(targetid, 0);
    }
    return 1;
}
Something like this? if you use other command processor I will change it.
Reply


Messages In This Thread
/sendto command help? - by Necip - 01.06.2013, 08:58
Re: /sendto command help? - by Stanford - 01.06.2013, 09:04
Re: /sendto command help? - by RenSoprano - 01.06.2013, 09:08
Re: /sendto command help? - by DeMoX - 01.06.2013, 09:12
Re: /sendto command help? - by Necip - 01.06.2013, 09:12
Re: /sendto command help? - by DeMoX - 01.06.2013, 09:14
Re: /sendto command help? - by RenSoprano - 01.06.2013, 09:15
Re: /sendto command help? - by Stanford - 01.06.2013, 09:17
Re: /sendto command help? - by Necip - 01.06.2013, 09:34

Forum Jump:


Users browsing this thread: 1 Guest(s)