24.10.2011, 23:56
(
Последний раз редактировалось bmxchamp4; 25.10.2011 в 05:08.
)
Ya i have been. My code looked like this:
I know for a fact that's wrong, but that's just a general idea of how I did it. Sorry for the screwed up indentations. That's not how the final product looked lol.
pawn Код:
CMD:911(playerid, params[])
{
new string[128], choice[32];
if(sscanf(params, "s[32]", choice))
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /911 [Emergency Service]");
SendClientMessageEx(playerid, COLOR_GREY, "Available names: Fire Department, EMS, Police, Fire and EMS");
return 1;
}
if(PlayerInfo[playerid][pJailed] > 0)
{
SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this in jail/prison.");
return 1;
}
if(strcmp(choice,"ems",true) == 0)
{
new zone[MAX_ZONE_NAME];
new Test[MAX_PLAYERS];
new Float:X,Float:Y,Float:Z;
GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
SetPVarInt(playerid, "EMSAttempt", 1);
SendClientMessageEx(playerid, COLOR_WHITE, "The EMS have been informed of your current location and are on their way.");
format(string, sizeof(string), "Emergency Dispatch has reported (%d) %s to be wounded at %s, They require immediate emergency transport.",playerid, GetPlayerNameEx(playerid), zone);
SendRadioMessage(4, TEAM_MED_COLOR, string);
SendDivisionMessage(12, 3, TEAM_MED_COLOR, string);
GetPlayerPos(Test, X, Y, Z);
SetPlayerCheckpoint(Test, X, Y, Z, 5);
return 1;
}
else {
SendClientMessageEx(playerid, COLOR_WHITE, "Invalid service specified");
SendClientMessageEx(playerid, COLOR_GREY, "If this is not an emergency please type /service for additional services");
return 1;
}
I know for a fact that's wrong, but that's just a general idea of how I did it. Sorry for the screwed up indentations. That's not how the final product looked lol.