Help Request heating Celebrities
#1

Can somebody give me Just A Game Mode With Command Of Teleport So for me to edit and put in my! Of preferences of those who is born Car Flipped
When the PEOPLE who will appear for All Where To It!.
Thanks!


FP Server under construction!
Reply
#2

pawn Код:
#include <a_samp>
#include "../include/gl_common.inc"
#include <string>

#define FILTERSCRIPT

#define COLOR_WHITE 0xFFFFFFFF

public OnPlayerCommandText(playerid, cmdtext[])
{
    new idx;
    new cmd[256];

    cmd = strtok(cmdtext, idx);

    if(strcmp("/tele", cmd, true) == 0)
    {
     if(IsPlayerAdmin(playerid)) {
            new tmp[256], player, Float:X, Float:Y, Float:Z, carid, seat;
            tmp = strtok(cmdtext, idx);
            player = strval(tmp);
            GetPlayerPos(player, X, Y, Z);
            if(IsPlayerInAnyVehicle(playerid)){
                carid = GetPlayerVehicleID(playerid);
                seat = GetPlayerVehicleSeat(playerid);
                SetVehiclePos(carid, X+1, Y, Z);
                PutPlayerInVehicle(playerid, carid, seat);
                return 1;
            }
            SetPlayerPos(playerid, X+1, Y, Z);
            return 1;
        }
        else{
            SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are not authorized to use this command.");
            return 1;
        }
    }
    if(strcmp("/get", cmd, true) == 0)
    {
     if(IsPlayerAdmin(playerid)) {
            new tmp[256], player, Float:X, Float:Y, Float:Z, carid, seat;
            tmp = strtok(cmdtext, idx);
            player = strval(tmp);
            GetPlayerPos(playerid, X, Y, Z);
            if(IsPlayerInAnyVehicle(player)){
                carid = GetPlayerVehicleID(player);
                seat = GetPlayerVehicleSeat(player);
                SetVehiclePos(carid, X+1, Y, Z);
                PutPlayerInVehicle(player, carid, seat);
                return 1;
            }
            SetPlayerPos(player, X+1, Y, Z);
            return 1;
        }
        else{
            SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are not authorized to use this command.");
            return 1;
        }
    }
    return 0;
}
with that you can teleport a player to you or teleport to that player by using his playerid.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)