/engineon CMD Help! and other questions!
#1

okay If I neeed to do a /engineon CMD I will do:

Код:
public  OnPlayerCommandText(playerid, cmdtext[])
if (strcmp("/engineon", cmdtext, true) == 0)
     ManualVehicleEngineAndLights

     SendClientMessage(playerid,COLOUR_PINK,"......");
the Hard part I want to do the (/do You can Hear the Engine Start ((the Name of the player)) )

how to put the Player Name there?

and another THing:

Код:
public OnPlayerDeath(playerid, killerid, reason)

  SendClientMessage(playerid,"....");

I want to send Message to the Killer to..... how to make it?


Thanks for help!
Reply
#2

well, you should switch a couple things.

Код:
public OnGameModeInit()
{
    ManualVehicleAndLights
}
then for your public OnPlayerDeath
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendClientMessage(killerid, "....");
I'll be editing this post. I'm just on an iPad right now.
Reply
#3

I Need Someone to Tell me how please?
Reply
#4

And I want to make /veh CMD how?? please help me?
Reply
#5

And I want to make /veh CMD how?? please help me?
Reply
#6

pawn Код:
CMD:veh(playerid,params[]) {
    #pragma unused params
    if(PlayerInfo[playerid][Level] >= 0 || instunt[playerid] == 1) {
    if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"ERROR: You already have a car.");
    else {
    ShowPlayerDialog( playerid, DIALOGID3+24, DIALOG_STYLE_LIST, "Vehicle Types", "{FF1400}Airplanes\n{FFB400}Helicopters\n{DCDCDC}Bikes\n{19FF00}Convertibles\n{FF00D7}Industrial\n{CD0000}Lowriders\n{2800FF}Off Road\n{F5FF00}Public Service Vehicles\n{C800FF}Saloons\n{FF6400}Sport Vehicles\n{FFD200}Station Wagons\n{FF3C00}Boats\n{EBFF00}Trailers\n{007DFF}Unique Vehicles", "Select", "Cancel" );
    return 1;
    }
    } else return SendClientMessage(playerid,COLOR_RED,"");
    }
have fun
Reply
#7

+1 reP For you and Check your INBOX please!!!
Reply
#8

how to make /engineon please? what did I do wrong upwards?
Reply
#9

Quote:
Originally Posted by Andrew97
Посмотреть сообщение
okay If I neeed to do a /engineon CMD I will do:

Код:
public  OnPlayerCommandText(playerid, cmdtext[])
if (strcmp("/engineon", cmdtext, true) == 0)
     ManualVehicleEngineAndLights

     SendClientMessage(playerid,COLOUR_PINK,"......");
the Hard part I want to do the (/do You can Hear the Engine Start ((the Name of the player)) )

how to put the Player Name there?

and another THing:

Код:
public OnPlayerDeath(playerid, killerid, reason)

  SendClientMessage(playerid,"....");

I want to send Message to the Killer to..... how to make it?


Thanks for help!
Well i can help you on the engine on and off thing and the send a message to the killer. I also have it added so the victim gets a message saying who killed them too. Here is a snipit from my server i am making.
pawn Код:
CMD:engineon( playerid, params[] )
{
    new pVeh;
    new engine,lights,alarm,doors,bonnet,boot,objective;
    pVeh = GetPlayerVehicleID( playerid );
    GetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(pVeh, 1, lights, alarm, doors, bonnet, boot, objective);
    SendClientMessage(playerid, -1, "Engine on");
    return 1;
}
CMD:engineoff( playerid, params[] )
{
    new pVeh;
    new engine,lights,alarm,doors,bonnet,boot,objective;
    pVeh = GetPlayerVehicleID( playerid );
    GetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(pVeh, 0, lights, alarm, doors, bonnet, boot, objective);
    SendClientMessage(playerid, -1, "Engine off");
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
    {
        new VictimName[24], KillerName[24], Msg[128];
        GetPlayerName(playerid, VictimName, sizeof(VictimName));//get names of the victim
        GetPlayerName(killerid, KillerName, sizeof(KillerName));//get names of the killer
        format(Msg, 128, "You've killed %s", VictimName);//send a message to the killer that he killed  the victim
        SendClientMessage(killerid, 0xFFFFFFFF, Msg);
        format(Msg, 128, "You've been killed by %s", KillerName);//send a message to the victim that the killer killed him.
        SendClientMessage(playerid, 0xFFFFFFFF, Msg);
        SendDeathMessage(killerid, playerid, reason);//makes that list on the right saying how the player died
    }
    return 1;
}
I am using ZCMD not strcmp like you are. This should help you alot.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)