- 0
Problema F4, faruri si /duty
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
k1mO
1. Deci cand apas F4, apare skin-ul care il am in functie de factiune si alea, iar daca dau spawn nu se intampla nimic si trebuie sa dai Q altfel nu merge.
2. Vreau sa fac faruriile s? se aprinda cu CTRL, nu stiu de ce trebuie sa apas de vro 10x ca sa se aprinda si tot nu raman aprinse. ( am o comanda lightson si lightsoff )
3. Am comanda /duty si merge sa o foloseasca si civili / membrii din alte factiuni.
2. Comanda lightson sa o fac sa mearga cu CTRL si lightsoff cu CTRL sa se stinga.
[pawn]// Comanda /lightson
//=============================================================================================================================================================
if(strcmp(cmd, "/lightson",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
// ||||||
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
//VEHICLE_PARAMS_ON is used to turn onn the lights.
}
return 1;
}
//=============================================================================================================================================================
// Comanda /lightsoff
//=============================================================================================================================================================
if(strcmp(cmd, "/lightsoff",true) == 0) {
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID) {
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
// ||||||
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
//Here the VEHICLE_PARAMS_OFF will turn off your lights.
}
return 1;
}[/pawn]
3. [pawn]//----------------------------------[duty]-----------------------------------------------
if(strcmp(cmd, "/duty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(playerid))
{
if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerToPoint(3,playerid,234.6342,112.0572,1003.2257) || PlayerToPoint(3,playerid,297.4851,186.3805,1007.1719))
{
if(OnDuty[playerid]==0)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Ofiter %s scoate un baston si o arma din dulap.", sendername);
}
else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
format(string, sizeof(string), "* Agent SRI %s scoate un baston si o arma din dulap", sendername);
}
else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
format(string, sizeof(string), "* Militar %s scoate un baston si o arma din dulap.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 24, 70);
GivePlayerWeapon(playerid, 3, 0);
SetPlayerArmour(playerid, 100);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid]==1)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Ofiter %s pune un baston si o arma in dulap.", sendername);
}
else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
format(string, sizeof(string), "* Agent SRI %s pune un baston si o arma in dulap.", sendername);
}
else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
format(string, sizeof(string), "* Militar %s pune un baston si o arma in dulap.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 0);
GivePlayerWeapon(playerid, 41, 500);
OnDuty[playerid] = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Nu esti la vestiare !");
return 1;
}
}[/pawn]
0 answers to this question
Recommended Posts