OnPlayerCommandText
#1

Solved
Reply
#2

It is work

i try it , what is problem ?
Reply
#3

for your string use 128
Reply
#4

Code:
 if(strcmp(cmdtext, "/drift6", true)==0) {
 		new name[ MAX_PLAYER_NAME];
        new string[128];
        GetPlayerName( playerid, name, sizeof(name));
        if(IsPlayerInAnyVehicle(playerid)) {
            if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
                SetVehiclePos(GetPlayerVehicleID(playerid), 1886.9543,1813.2212,18.9339);
                SetVehicleZAngle(GetPlayerVehicleID(playerid), 178.7448);
                SetCameraBehindPlayer(playerid);
                format( string, sizeof(string), "[TELEPORT] Player %s has gone to drift 6 [/drift6]",name);
        		SendClientMessageToAll( COLOR_GREEN,string);
            }
            else {
                SendClientMessage(playerid,0xFFFF00AA, "ERROR: You need to be the driver!");
            }
        }
        else {
            SetPlayerPos(playerid, 1886.9543,1813.2212,18.9339);
            SetPlayerFacingAngle(playerid, 110.5445);
            SetCameraBehindPlayer(playerid);
            format( string, sizeof(string), "[TELEPORT] Player %s has gone to drift 6 [/drift6]",name);
        	SendClientMessageToAll( COLOR_GREEN,string);
        }


        return 1;
    }
try this
Reply
#5

Solved
Reply
#6

Quote:
Originally Posted by Kitten
View Post
that actually isnt the solution i had zcmd running and using onplayercommandtext thanks anyways.
Thanks to MrDeath?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)