Jump to content
  • 0

Crash


eXtreMe96

Question

4 answers to this question

Recommended Posts

Stergei contul .... nu stiu ce sa zic ....

Poftim comanda asta de crash si vezi daca merge :

//----------------------------------[crash]--------------------------------------

if(strcmp(cmd, "/crash", true) == 0)

{

if(IsPlayerConnected(playerid))

{

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

    SendClientMessage(playerid, COLOR_GRAD2, " /crash [playerid/PartOfName]");

    return 1;

}

giveplayerid = ReturnUser(tmp);

if (PlayerInfo[playerid][pAdmin] >= 5)

{

    if(IsPlayerConnected(giveplayerid))

    {

        if(giveplayerid != INVALID_PLAYER_ID)

        {

        new Float:X, Float:Y, Float:Z;

        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

        GetPlayerPos(giveplayerid,X,Y,Z);

        new objectcrash = CreatePlayerObject(giveplayerid,11111111,X,Y,Z,0,0,0);

        DestroyDynamicObject(objectcrash);

format(string, sizeof(string), "You have crashed \"%s's\" game", giveplayer);

  SendClientMessage(playerid,COLOR_DBLUE, string);

return 1;

}

}

}

else

{

    format(string, sizeof(string), "  %d is not an active player.", giveplayerid);

    SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}

16189165.gifrastamaunbydeejaylobo1.gifsmileysw0181.gif

xmsok6ay41.gif

Link to comment
Share on other sites

sperie-l  ;D

dcmd_destroy(playerid,params[]) {
	if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][Level] >= 1) {
	    if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /destroy [playerid]");
		new player1 = strval(params), string[128], Float:X,Float:Y,Float:Z, Float:angle;
		if(!IsNumeric(params)) player1 = ReturnPlayerID(params);
	   	else player1 = strval(params);
		if(PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
        if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
   			CMDMessageToAdmins(playerid,"destroy");
	        GetPlayerPos(player1,X,Y,Z);
			if(IsPlayerInAnyVehicle(player1))
			{
			new carid=GetPlayerVehicleID(player1);
			GetVehicleZAngle ( carid, angle );
			SetVehiclePos(carid,X,Y,Z+90);
		    GetVehicleVelocity ( GetPlayerVehicleID ( player1), X, Y, Z );
			X = 90 * floatcos ( angle + 90.0, degrees) + X;
			Y = 90 * floatsin ( angle + 90.0, degrees) + Z;
			SetVehicleVelocity ( carid, X, Y, Z );
			SetVehicleVelocity ( GetPlayerVehicleID ( player1), X * 1000, Y * 1000, Z * 1000 );
			}
			else
			{
			//new carid=GetPlayerVehicleID(player1);
			SetPlayerPos(player1,X,Y,Z+90);
		    GetPlayerVelocity ( player1, X, Y, Z );
			X = 90 * floatcos ( angle + 90.0, degrees) + X;
			Y = 90 * floatsin ( angle + 90.0, degrees) + Z;
			SetPlayerVelocity ( player1, X, Y, Z );
			SetPlayerVelocity ( player1, X * 1000, Y * 1000, Z * 1000 );
			}
			format(string, sizeof(string), "L'ai ... pe  \"%s's\" ", pName(player1) );
			return SendClientMessage(playerid,blue, string);
	    } else return SendClientMessage(playerid,red,"ERROR: Player is not connected");
	} else return SendNotPermision(playerid);
}

E facut in ladmin...vezi tu :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.