How to make goto and get commands ?
#3

Add this to the top of your script.
PHP код:
#include <zcmd> 
And download this: https://sampforum.blast.hk/showthread.php?tid=91354

Commands:
PHP код:
CMD:get(playerid,params[])
{
    if(
IsPlayerAdmin(playerid))
    {
        new 
id;
        new 
Float:xFloat:yFloat:z;
        if (!
strlen(params)) return SendClientMessage(playerid0xFF0000FF"Usage: /get [id]");
        
id strval(params);
        if (!
IsPlayerConnected(id))SendClientMessage(playerid0xFF0000FF"Player not found.");
        
GetPlayerPos(playeridxyz);
        
SetPlayerPos(idxyz);
    }
    else
    {
        
SendClientMessage(playerid0xFF0000FF"You need to be an admin to use this.");
    }
    return 
1;

PHP код:
CMD:goto(playeridparams[])
{
    if(
IsPlayerAdmin(playerid))
    {
        new 
id;
        new 
Float:xFloat:yFloat:z;
        if (!
strlen(params)) return SendClientMessage(playerid0xFF0000FF"Usage: /goto [id]");
        
id strval(params);
        if (!
IsPlayerConnected(id))SendClientMessage(playerid0xFF0000FF"Player not found.");
        
GetPlayerPos(idxyz);
        
SetPlayerPos(playeridxyz);
    }
    else
    {
        
SendClientMessage(playerid0xFF0000FF"You need to be an admin to use this.");
    }
    return 
1;

Reply


Messages In This Thread
How to make goto and get commands ? - by Le3aT - 30.11.2013, 17:07
Re: How to make goto and get commands ? - by J4mmyHD - 30.11.2013, 17:11
Re: How to make goto and get commands ? - by Stinged - 30.11.2013, 17:51

Forum Jump:


Users browsing this thread: 1 Guest(s)