Please help. -
ChunkyGaming26 - 12.01.2016
I want to change the layout on my Crime Reports, when someone calls 911 it Auto makes a Message to the LSPD/FBI
can someone help me change it so it looks better
Old Scripting!
}
SendCrimeMessage(target, playerid, crime[]) {
new msg[128];
format(msg, sizeof(msg), "HQ: All Units APB: Reporter: %s",GetPlayerNameEx(playerid, ENameType_RPName_NoMask));
SendCopMessage(TEAM_BLUE_COLOR, msg);
format(msg, sizeof(msg), "HQ: Crime: %s, Suspect: %s",crime,GetPlayerNameEx(target, ENameType_RPName_NoMask));
SendCopMessage(TEAM_BLUE_COLOR, msg);
return 1;
}
How i want the new One.
|____Emergency 911 Call____|
Reporter:
Phone Number:
Location:
CRIME:
-----------------------------------
Re: Please help. -
lucamsx - 12.01.2016
How are we supposed to know how do you get variables like player's location and phone number?
Код:
SendCrimeMessage(target, playerid, crime[])
{
new msg[128];
SendCopMessage(TEAM_BLUE_COLOR, "|___ emergency 911 call ___|")
format(msg, sizeof(msg), "Reporter: %s",GetPlayerNameEx(playerid, ENameType_RPName_NoMask));
SendCopMessage(TEAM_BLUE_COLOR, msg);
format(msg, sizeof(msg), "Phone Number: %d", phonenumber);
SendCopMessage(TEAM_BLUE_COLOR, msg);
format(msg, sizeof(msg), "Location: %s", location);
SendCopMessage(TEAM_BLUE_COLOR, msg);
format(msg, sizeof(msg), "Crime: %s",crime);
SendCopMessage(TEAM_BLUE_COLOR, msg);
SendCopMessage(TEAM_BLUE_COLOR, "------------------------------------")
return 1;
}
Re: Please help. -
-CaRRoT - 13.01.2016
Just to clarify since you obviously have no idea how to edit a PAWN code.
The code above me will NOT work UNLESS you SWITCH out the following variables with YOUR script's variables.
Код:
phonenumber, location, crime
So go to the enumerator where your save your player variables and look for the phone number variable, and then you'll have to make a simple code that gets the caller location using GetPlayerPos. For the crime, it really depends if the caller describes the crime in the call or not, cause if not - you'll have to make another code under OnPlayerText to grab whatever the caller said and put it there as a string.
Re: Please help. -
saffierr - 13.01.2016
Quote:
Originally Posted by lucamsx
How are we supposed to know how do you get variables like player's location and phone number?
Код:
SendCrimeMessage(target, playerid, crime[])
{
new msg[128];
SendCopMessage(TEAM_BLUE_COLOR, "|___ emergency 911 call ___|")
format(msg, sizeof(msg), "Reporter: %s",GetPlayerNameEx(playerid, ENameType_RPName_NoMask));
SendCopMessage(TEAM_BLUE_COLOR, msg);
format(msg, sizeof(msg), "Phone Number: %d", phonenumber);
SendCopMessage(TEAM_BLUE_COLOR, msg);
format(msg, sizeof(msg), "Location: %s", location);
SendCopMessage(TEAM_BLUE_COLOR, msg);
format(msg, sizeof(msg), "Crime: %s",crime);
SendCopMessage(TEAM_BLUE_COLOR, msg);
SendCopMessage(TEAM_BLUE_COLOR, "------------------------------------")
return 1;
}
|
Quote:
Originally Posted by -CaRRoT
Just to clarify since you obviously have no idea how to edit a PAWN code.
The code above me will NOT work UNLESS you SWITCH out the following variables with YOUR script's variables.
Код:
phonenumber, location, crime
So go to the enumerator where your save your player variables and look for the phone number variable, and then you'll have to make a simple code that gets the caller location using GetPlayerPos. For the crime, it really depends if the caller describes the crime in the call or not, cause if not - you'll have to make another code under OnPlayerText to grab whatever the caller said and put it there as a string.
|
It was obviously a example from lucamsx, how it should look like