Schönen guten Abend,
Könnte mir einer vielleicht sagen wie ich z.b. im "Cop Car" /Duty gehen kann?
Hab einfach kein Plan wie ich es anstellen soll.
Hat jemand einen Tipp?
//----------------------------------[offduty]-----------------------------------------------
if(strcmp(cmd, "/duty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsACop(playerid))
{
if (IsPlayerInRangeOfPoint(playerid,3.0,253.1312,68.1724,1003.6406) ||IsPlayerInRangeOfPoint(playerid,3.0,255.3,77.4,1003.6)
IsPlayerInRangeOfPoint(playerid,3.0,-1616.1294,681.1594,7.1875) IsPlayerInRangeOfPoint(playerid,3.0, 217.5230,184.4352,1003.0313)
IsPlayerInRangeOfPoint(playerid,3.0, 217.8921,78.9727,1005.0391) IsPlayerInRangeOfPoint(playerid, 3.0, 227.6817,111.9523,1003.2188)
IsPlayerInRangeOfPoint(playerid,3.0, 201.5240,1871.6528,13.1406) IsPlayerInRangeOfPoint(playerid, 3.0, 324.5495,306.6057,999.1484)
PlayerInfo[playerid][pLocal] != 255)
{
if(OnDuty[playerid]==0)
{
format(string, sizeof(string), "* %s nimmt seine Marke & seine Waffen aus dem Schrank, und geht in den Dienst.", sendername);
ProxDetector(30.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 41, 500); //spray
GivePlayerWeapon(playerid, 3, 1); //Nightstick
GivePlayerWeapon(playerid, 25, 100); //Shotgun
GivePlayerWeapon(playerid, 24, 500); //Desert Eagle
GivePlayerWeapon(playerid, 29, 500); //MP5
GivePlayerWeapon(playerid, 31, 1000); //MP5
GivePlayerWeapon(playerid, 34, 150); //MP5
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid]==1)
{
format(string, sizeof(string), "* %s legt seine Marke & seine Waffen in dem Schrank, und geht außer Dienst.", sendername);
ProxDetector(30.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 0);
OnDuty[playerid] = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du bist nicht am Punkt um Duty zu gehen!");
return 1;
}
} else if
if(strcmp(cmd, "/duty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsACop(playerid))
{
if (IsPlayerInRangeOfPoint(playerid,3.0,253.1312,68.1724,1003.6406) ||IsPlayerInRangeOfPoint(playerid,3.0,255.3,77.4,1003.6)
IsPlayerInRangeOfPoint(playerid,3.0,-1616.1294,681.1594,7.1875) IsPlayerInRangeOfPoint(playerid,3.0, 217.5230,184.4352,1003.0313)
IsPlayerInRangeOfPoint(playerid,3.0, 217.8921,78.9727,1005.0391) IsPlayerInRangeOfPoint(playerid, 3.0, 227.6817,111.9523,1003.2188)
IsPlayerInRangeOfPoint(playerid,3.0, 201.5240,1871.6528,13.1406) IsPlayerInRangeOfPoint(playerid, 3.0, 324.5495,306.6057,999.1484)
PlayerInfo[playerid][pLocal] != 255)
{
if(OnDuty[playerid]==0)
{
format(string, sizeof(string), "* %s nimmt seine Marke & seine Waffen aus dem Schrank, und geht in den Dienst.", sendername);
ProxDetector(30.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 41, 500); //spray
GivePlayerWeapon(playerid, 3, 1); //Nightstick
GivePlayerWeapon(playerid, 25, 100); //Shotgun
GivePlayerWeapon(playerid, 24, 500); //Desert Eagle
GivePlayerWeapon(playerid, 29, 500); //MP5
GivePlayerWeapon(playerid, 31, 1000); //MP5
GivePlayerWeapon(playerid, 34, 150); //MP5
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid]==1)
{
format(string, sizeof(string), "* %s legt seine Marke & seine Waffen in dem Schrank, und geht außer Dienst.", sendername);
ProxDetector(30.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 0);
OnDuty[playerid] = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du bist nicht am Punkt um Duty zu gehen!");
return 1;
}
} else if
/edit: Pwn Code eingefügt.