SA-MP Forums Archive
OnPlayerCommandText - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerCommandText (/showthread.php?tid=247858)



OnPlayerCommandText - Kitten - 11.04.2011

Solved


Re: OnPlayerCommandText - serman - 11.04.2011

It is work

i try it , what is problem ?


Re: OnPlayerCommandText - tanush - 11.04.2011

for your string use 128


Re: OnPlayerCommandText - serman - 11.04.2011

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


Re: OnPlayerCommandText - Kitten - 11.04.2011

Solved


Re: OnPlayerCommandText - MrDeath537 - 11.04.2011

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