how to add the message to this -
[LHT]Bally - 24.09.2011
i got 4 commands i want i got ,nos,repair,hy i no how to make it so u have to have score to be able to use it.
how i make it send a message if you are not at that score
i have tried a few things and it is annoying me
pawn Код:
if(!strcmp(command, "/repair", true))
{
if(!IsPlayerInAnyVehicle(playerid))
if(GetPlayerScore(playerid) >= 100)
{
return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
}
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
GivePlayerMoney(playerid, -200);
SendClientMessage(playerid, 0xFFFFFFFF, "{00ff00}Vehicle Repaired {ff0000}$200");
return 1;
}
pawn Код:
if(strcmp("/flip", cmdtext, true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerScore(playerid) >= 100)
{
new vehicle;
new Float:zangle;
vehicle = GetPlayerVehicleID(playerid);
GetVehicleZAngle(vehicle,zangle);
SetVehicleZAngle(vehicle,zangle);
SendClientMessage(playerid, COLOR_NAVY, "[APS]Vehicle Flipped");
}
}
return 1;
}
pawn Код:
if(!strcmp(command, "/hy",true))
{
if(GetPlayerVehicleID(playerid) != 0)
{
new LModel = GetVehicleModel(GetPlayerVehicleID(playerid));
switch(LModel)
{
case 448,461,462,463,468,471,509,510,521,522,523,581,586,449:
return SendClientMessage(playerid,red,"ERROR: You can not tune this vehicle!");
}
AddVehicleComponent(GetPlayerVehicleID(playerid), 1087);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
}
else
{
SendClientMessage(playerid, red, "ERROR: You are not in a vehicle");
}
return 1;
}
pawn Код:
if (strcmp("/nos", cmdtext, true) == 0)
{
new vehicle = GetPlayerVehicleID(playerid);
if(GetPlayerScore(playerid) >= 100)
{
AddVehicleComponent(vehicle, 1010);
SendClientMessage(playerid, COLOR_NAVY, "{00ff00}Nos Added");
return 1;
}
}
Re: how to add the message to this -
Jafet_Macario - 24.09.2011
PHP код:
if(GetPlayerScore(playerid) < 100) return SendClientMessage(playerid, -1,"You must have atleast 100 score!"); // If he has below 100 score, it will not work.
Re: how to add the message to this -
CmZxC - 24.09.2011
pawn Код:
if(!strcmp(command, "/repair", true))
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
return 1;
}
if(GetPlayerScore(playerid) < 100)
{
SendClientMessage(playerid,0xFFFFFFFF,"You don't have egnouh score! (100 required)");
return 1;
}
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
GivePlayerMoney(playerid, -200);
SendClientMessage(playerid, 0xFFFFFFFF, "{00ff00}Vehicle Repaired {ff0000}$200");
return 1;
}
Re: how to add the message to this -
[LHT]Bally - 24.09.2011
thankyou i tried it a diffrent way , but thanks i understand now