pawn Код:
public OnPlayerText(playerid, text[])
{
if(gPlayerLogged{playerid} != 1)
{
SendClientMessageEx(playerid, COLOR_RED, "You are not logged in.");
return 0;
}
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new string[128];
playerLastTyped[playerid] = 0;
if(TextSpamUnmute[playerid] != 0)
{
if(PlayerInfo[playerid][pAdmin] < 2)
{
SendClientMessage(playerid, COLOR_WHITE, "You are muted from submitting text right now.");
return 0;
}
}
if(PlayerInfo[playerid][pAdmin] < 2)
{
TextSpamTimes[playerid]++;
if(TextSpamTimes[playerid] == 5)
{
TextSpamTimes[playerid] = 0;
TextSpamUnmute[playerid] = 10;
SendClientMessageEx(playerid, COLOR_YELLOW, "You have been muted automatically for spamming. Please wait 10 seconds and try again.");
SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_FLOODPROTECTION);
return 0;
}
}
if(strfind(text, "|", true) != -1) {
SendClientMessageEx(playerid, COLOR_RED, "You cannot use the '|' character in text.");
return 0;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessageEx(playerid, COLOR_GREY, "You cannot speak, you have been silenced!");
return 0;
}
if(PlayerInfo[playerid][pAdmin] < 2) {
if(strfind(text, ":", true) != -1) {
new
i_numcount,
i_period,
i_pos;
while(text[i_pos]) {
if('0' <= text[i_pos] <= '9') i_numcount++;
else if(text[i_pos] == '.') i_period++;
i_pos++;
}
if(i_numcount >= 8 && i_period >= 3) {
format(string,sizeof(string),"Warning: %s may be server advertising: '%s'.", GetPlayerNameEx(playerid),text);
SendAdminMessage(COLOR_RED, string);
return 0;
}
}
}
if(GetPVarInt(playerid, "ChoosingDrugs") == 1)
{
if (strcmp("pot", text, true) == 0)
{
new mypoint = -1;
for (new i=0; i<MAX_POINTS; i++)
{
if (IsPlayerInRangeOfPoint(playerid, 3.0, Points[i][Pointx], Points[i][Pointy], Points[i][Pointz]) && strcmp(Points[i][Name], "Drug Factory", true) == 0)
{
mypoint = i;
}
}
if (mypoint == -1)
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not at the Drug Factory!");
return 0;
}
if(PlayerInfo[playerid][pCrates])
{
SendClientMessageEx(playerid, COLOR_GREY, " You can't hold any more Drug Crates!");
SetPVarInt(playerid, "ChoosingDrugs", 0);
return 0;
}
if(GetPlayerCash(playerid) > 1000)
{
SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You bought some Drug Crates for $1000.");
GivePlayerCash(playerid, -1000);
PlayerInfo[playerid][pCrates] = 1;
SetPVarInt(playerid, "CrateDeliver", 1);
SetPVarInt(playerid, "ChoosingDrugs", 0);
SetPVarInt(playerid, "tpDrugRunTimer", 45);
SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_TPDRUGRUNTIMER);
SetPlayerCheckpoint(playerid, 2166.3772,-1675.3829,15.0859, 3);
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
{
FamilyInfo[i][FamilyBank] += 500;
}
}
return 0;
}
else
{
SendClientMessageEx(playerid, COLOR_GREY," You can't afford the $1000!");
SetPVarInt(playerid, "ChoosingDrugs", 0);
return 0;
}
}
else if (strcmp("crack", text, true) == 0)
{
new mypoint = -1;
for (new i=0; i<MAX_POINTS; i++)
{
if (IsPlayerInRangeOfPoint(playerid, 3.0, Points[i][Pointx], Points[i][Pointy], Points[i][Pointz]) && strcmp(Points[i][Name], "Drug Factory", true) == 0)
{
mypoint = i;
}
}
if (mypoint == -1)
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not at the Drug Factory!");
return 0;
}
if(PlayerInfo[playerid][pCrates])
{
SendClientMessageEx(playerid, COLOR_GREY, " You can't hold any more drug crates!");
SetPVarInt(playerid, "ChoosingDrugs", 0);
return 0;
}
if(GetPlayerCash(playerid) > 1000)
{
SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You bought some drug crates for $1000.");
GivePlayerCash(playerid, -1000);
PlayerInfo[playerid][pCrates] = 1;
SetPVarInt(playerid, "CrateDeliver", 2);
SetPVarInt(playerid, "ChoosingDrugs", 0);
SetPVarInt(playerid, "tpDrugRunTimer", 45);
SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_TPDRUGRUNTIMER);
SetPlayerCheckpoint(playerid, 2354.2808,-1169.2959,28.0066, 3);
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
{
FamilyInfo[i][FamilyBank] += 500;
}
}
return 0;
}
else
{
SendClientMessageEx(playerid, COLOR_GREY," You can't afford the $1000!");
SetPVarInt(playerid, "ChoosingDrugs", 0);
return 0;
}
}
else
{
SendClientMessageEx(playerid, COLOR_LIGHTRED,"What type of drugs would you like to smuggle? Type 'crack' or 'pot'.");
return 0;
}
}
if(SelectChar[playerid] == 255)
{
if (strcmp("next", text, true) == 0)
{
switch (SelectCharID[playerid])
{
case 1: //Police Force
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[0][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[0][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[1][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[1][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[2][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[2][0]; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[3][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[3][0]; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[4][0]); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = JoinPed[4][0]; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[5][0]); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = JoinPed[5][0]; }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[6][0]); SelectCharPlace[playerid] = 8; ChosenSkin[playerid] = JoinPed[6][0]; }
else if(SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid, JoinPed[7][0]); SelectCharPlace[playerid] = 9; ChosenSkin[playerid] = JoinPed[7][0]; }
else if(SelectCharPlace[playerid] == 9) { SetPlayerSkin(playerid, JoinPed[8][0]); SelectCharPlace[playerid] = 10; ChosenSkin[playerid] = JoinPed[8][0]; }
else if(SelectCharPlace[playerid] == 10) { SetPlayerSkin(playerid, JoinPed[9][0]); SelectCharPlace[playerid] = 11; ChosenSkin[playerid] = JoinPed[9][0]; }
else if(SelectCharPlace[playerid] == 11) { SetPlayerSkin(playerid, JoinPed[10][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[10][0]; }
}
case 2: //FBI/ATF
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[11][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[11][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[12][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[12][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[13][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[13][0]; }
}
case 3: //SASP
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[14][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[14][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[15][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[15][0]; }
}
case 4: //Fire&Ambulance
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[16][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[16][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[17][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[17][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[18][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[18][0]; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[19][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[19][0]; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[20][0]); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = JoinPed[20][0]; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[21][0]); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = JoinPed[21][0]; }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[22][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[22][0]; }
}
case 6: //The Senate
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[31][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[31][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[32][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[32][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[33][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[33][0]; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[34][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[34][0]; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[35][0]); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = JoinPed[35][0]; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[36][0]); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = JoinPed[36][0]; }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[37][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[37][0]; }
}
case 8: //Hitman Agency
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[38][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[38][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[39][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[39][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[40][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[40][0]; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[41][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[41][0]; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[42][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[42][0]; }
}
case 9: //News Reporters
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[43][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[43][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[44][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[44][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[45][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[45][0]; }
}
case 10: //Taxi Cab Company
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[46][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[46][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[47][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[47][0]; }
}
case 11: //National Guard
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[48][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[48][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[49][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[49][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[50][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[50][0]; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[51][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[51][0]; }
}
}
return 0;
}
else if (strcmp("done", text, true) == 0)
{
PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
SetPlayerVirtualWorld(playerid,0);
PlayerInfo[playerid][pVW] = 0;
SetPVarInt(playerid, "MedicBill", 0);
SelectCharPlace[playerid] = 0;
SelectCharID[playerid] = 0;
SelectChar[playerid] = 0;
PlayerInfo[playerid][pInt] = 0;
TogglePlayerControllable(playerid,1);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1715.1201,-1903.1711,13.5665);
SetPlayerFacingAngle(playerid, 359.4621);
SetCameraBehindPlayer(playerid);
return 0;
}
else
{
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Use 'next', or 'done'.");
return 0;
}
}
if(SelectFChar[playerid] == 255)
{
if (strcmp("next", text, true) == 0) {
new f2text;
f2text = PlayerInfo[playerid][pFMember];
if(FamilyInfo[f2text][FamilyMaxSkins] == 1)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
}
if(FamilyInfo[f2text][FamilyMaxSkins] == 2)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 1; }
}
if(FamilyInfo[f2text][FamilyMaxSkins] == 3)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 1; }
}
if(FamilyInfo[f2text][FamilyMaxSkins] == 3)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 1; }
}
if(FamilyInfo[f2text][FamilyMaxSkins] == 4)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 4; }
else if(SelectFCharPlace[playerid] == 4) { SetFamilySkin(playerid, 3); SelectFCharPlace[playerid] = 1; }
}
if(FamilyInfo[f2text][FamilyMaxSkins] == 5)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 4; }
else if(SelectFCharPlace[playerid] == 4) { SetFamilySkin(playerid, 3); SelectFCharPlace[playerid] = 5; }
else if(SelectFCharPlace[playerid] == 5) { SetFamilySkin(playerid, 4); SelectFCharPlace[playerid] = 1; }
}
if(FamilyInfo[f2text][FamilyMaxSkins] == 6)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 4; }
else if(SelectFCharPlace[playerid] == 4) { SetFamilySkin(playerid, 3); SelectFCharPlace[playerid] = 5; }
else if(SelectFCharPlace[playerid] == 5) { SetFamilySkin(playerid, 4); SelectFCharPlace[playerid] = 6; }
else if(SelectFCharPlace[playerid] == 6) { SetFamilySkin(playerid, 5); SelectFCharPlace[playerid] = 1; }
}
if(FamilyInfo[f2text][FamilyMaxSkins] == 7)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 4; }
else if(SelectFCharPlace[playerid] == 4) { SetFamilySkin(playerid, 3); SelectFCharPlace[playerid] = 5; }
else if(SelectFCharPlace[playerid] == 5) { SetFamilySkin(playerid, 4); SelectFCharPlace[playerid] = 6; }
else if(SelectFCharPlace[playerid] == 6) { SetFamilySkin(playerid, 5); SelectFCharPlace[playerid] = 7; }
else if(SelectFCharPlace[playerid] == 7) { SetFamilySkin(playerid, 6); SelectFCharPlace[playerid] = 1; }
}
if(FamilyInfo[f2text][FamilyMaxSkins] == 8)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 4; }
else if(SelectFCharPlace[playerid] == 4) { SetFamilySkin(playerid, 3); SelectFCharPlace[playerid] = 5; }
else if(SelectFCharPlace[playerid] == 5) { SetFamilySkin(playerid, 4); SelectFCharPlace[playerid] = 6; }
else if(SelectFCharPlace[playerid] == 6) { SetFamilySkin(playerid, 5); SelectFCharPlace[playerid] = 7; }
else if(SelectFCharPlace[playerid] == 7) { SetFamilySkin(playerid, 6); SelectFCharPlace[playerid] = 8; }
else if(SelectFCharPlace[playerid] == 8) { SetFamilySkin(playerid, 7); SelectFCharPlace[playerid] = 1; }
}
return 0;
}
else if (strcmp("done", text, true) == 0)
{
PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
SetPlayerVirtualWorld(playerid,0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pInt] = 0;
SetPVarInt(playerid, "MedicBill", 0);
SelectFCharPlace[playerid] = 0;
SelectFCharID[playerid] = 0;
SelectFChar[playerid] = 0;
TogglePlayerControllable(playerid,1);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1715.1201,-1903.1711,13.5665);
SetPlayerFacingAngle(playerid, 359.4621);
SetCameraBehindPlayer(playerid);
return 0;
}
else
{
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Use 'next', or 'done'.");
return 0;
}
}
if(RegistrationStep[playerid] > 0)
{
if(RegistrationStep[playerid] == 1)
{
if (strcmp("male", text, true) == 0)
{
PlayerInfo[playerid][pSex] = 1;
SendClientMessageEx(playerid, COLOR_YELLOW2, "Alright, so you're a male.");
SendClientMessageEx(playerid, COLOR_LIGHTRED, "What is your date of birth? (Use dd/mm/yyyy)");
RegistrationStep[playerid] = 2;
return 0;
}
else if (strcmp("female", text, true) == 0)
{
PlayerInfo[playerid][pSex] = 2;
SendClientMessageEx(playerid, COLOR_YELLOW2, "Alright, so you're a female.");
SendClientMessageEx(playerid, COLOR_LIGHTRED, "What is your date of birth? (Use dd/mm/yyyy)");
RegistrationStep[playerid] = 2;
return 0;
}
else
{
SendClientMessageEx(playerid, COLOR_GREEN, "Are you a male or female? Type in your choice.");
}
return 0;
}
else if(RegistrationStep[playerid] == 2)
{
new year, month,day;
getdate(year, month, day);
new DateInfo[3][20];
splits(text, DateInfo, '/');
if(year - strval(DateInfo[2]) > 100 || strval(DateInfo[2]) < 1 || strval(DateInfo[2]) >= year)
{
SendClientMessageEx(playerid, COLOR_LIGHTRED, "What is your date of birth? (Use dd/mm/yyyy)");
return 0;
}
new check = year - strval(DateInfo[2]);
if(check == year)
{
SendClientMessageEx(playerid, COLOR_GREEN, "What is your date of birth? (Use dd/mm/yyyy)");
return 0;
}
if(strval(DateInfo[1]) > month)
{
check -= 1;
}
else if(strval(DateInfo[1]) == month && strval(DateInfo[0]) > day)
{
check -= 1;
}
PlayerInfo[playerid][pAge] = check;
PlayerInfo[playerid][pOrigin] = 0;
format(string, sizeof(string), "Ok, so you are %d year old.",PlayerInfo[playerid][pAge]);
SendClientMessageEx(playerid, COLOR_YELLOW2, string);
SendClientMessageEx(playerid, COLOR_LIGHTRED, "Thanks for filling in all the information, Welcome to Galaxy Roleplay.!");
//SendClientMessageEx(playerid, TEAM_CYAN, "We Hope Your Enjoy Your Stay Make Sure To Check Out Are Fourms");
RegistrationStep[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
ClearChatbox(playerid);
SendClientMessageEx(playerid, COLOR_YELLOW, "Type /newplayer if you are new to roleplay/would like to be shown around.");
SendClientMessageEx(playerid, COLOR_YELLOW, "Type /start to start playing!");
ShowTutGUIBox(playerid);
ShowTutGUIFrame(playerid, 1);
TutStep[playerid] = 1;
}
return 0;
}
if(MarriageCeremoney[playerid] > 0)
{
if (strcmp("yes", text, true) == 0)
{
if(GotProposedBy[playerid] < 999)
{
if(IsPlayerConnected(GotProposedBy[playerid]))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(GotProposedBy[playerid], giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "Priest: %s do you take %s as your lovely wife? (Type 'yes' - anything else will reject the marriage).", giveplayer,sendername);
SendClientMessageEx(GotProposedBy[playerid], COLOR_WHITE, string);
MarriageCeremoney[GotProposedBy[playerid]] = 1;
MarriageCeremoney[playerid] = 0;
GotProposedBy[playerid] = 999;
return 0; // Yeah... no more "YES DILDOS SEX RAPE LOL" broadcast to the whole server
}
else
{
MarriageCeremoney[playerid] = 0;
GotProposedBy[playerid] = 999;
return 0;
}
}
else if(ProposedTo[playerid] < 999)
{
if(IsPlayerConnected(ProposedTo[playerid]))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(ProposedTo[playerid], giveplayer, sizeof(giveplayer));
if(PlayerInfo[playerid][pSex] == 1 && PlayerInfo[ProposedTo[playerid]][pSex] == 2)
{
format(string, sizeof(string), "Priest: %s and %s i pronounce you now... Husband & Wife, you may kiss the bride.", sendername, giveplayer);
SendClientMessageEx(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Priest: %s and %s i pronounce you now... Husband & Wife, you may kiss the groom.", giveplayer, sendername);
SendClientMessageEx(ProposedTo[playerid], COLOR_WHITE, string);
format(string, sizeof(string), "Marriage News: We have a new lovely couple! %s & %s have been married.", sendername, giveplayer);
OOCNews(COLOR_WHITE, string);
}
else if(PlayerInfo[playerid][pSex] == 1 && PlayerInfo[ProposedTo[playerid]][pSex] == 1)
{
format(string, sizeof(string), "Priest: %s and %s i pronounce you now... Husband & Husband, you may kiss the bride.", sendername, giveplayer);
SendClientMessageEx(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Priest: %s and %s i pronounce you now... Husband & Husband, you may kiss the groom.", giveplayer, sendername);
SendClientMessageEx(ProposedTo[playerid], COLOR_WHITE, string);
format(string, sizeof(string), "Marriage News: We have a new gay couple! %s & %s have been married.", sendername, giveplayer);
OOCNews(COLOR_WHITE, string);
}
else if(PlayerInfo[playerid][pSex] == 2 && PlayerInfo[ProposedTo[playerid]][pSex] == 2)
{
format(string, sizeof(string), "Priest: %s and %s i pronounce you now... Wife & Wife, you may kiss the Bride.", sendername, giveplayer);
SendClientMessageEx(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Priest: %s and %s i pronounce you now... Wife & Wife, you may kiss the Groom.", giveplayer, sendername);
SendClientMessageEx(ProposedTo[playerid], COLOR_WHITE, string);
format(string, sizeof(string), "Marriage News: We have a new lesbian couple! %s & %s have been married.", sendername, giveplayer);
OOCNews(COLOR_WHITE, string);
}
//MarriageCeremoney[ProposedTo[playerid]] = 1;
MarriageCeremoney[ProposedTo[playerid]] = 0;
MarriageCeremoney[playerid] = 0;
format(PlayerInfo[ProposedTo[playerid]][pMarriedTo], MAX_PLAYER_NAME, "%s", sendername);
format(PlayerInfo[playerid][pMarriedTo], MAX_PLAYER_NAME, "%s", giveplayer);
GivePlayerCash(playerid, - 100000);
PlayerInfo[playerid][pMarried] = 1;
PlayerInfo[ProposedTo[playerid]][pMarried] = 1;
ProposedTo[playerid] = 999;
MarriageCeremoney[playerid] = 0;
return 0;
}
else
{
MarriageCeremoney[playerid] = 0;
ProposedTo[playerid] = 999;
return 0;
}
}
}
else
{
if(GotProposedBy[playerid] < 999)
{
if(IsPlayerConnected(GotProposedBy[playerid]))
{
format(string, sizeof(string), "* You didn't want to marry %s, no 'yes' was said.", GetPlayerNameEx(GotProposedBy[playerid]));
SendClientMessageEx(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "* %s did't want to marry you, no 'yes' was said.",GetPlayerNameEx(playerid));
SendClientMessageEx(GotProposedBy[playerid], COLOR_YELLOW, string);
return 0;
}
else
{
MarriageCeremoney[playerid] = 0;
GotProposedBy[playerid] = 999;
return 0;
}
}
else if(ProposedTo[playerid] < 999)
{
if(IsPlayerConnected(ProposedTo[playerid]))
{
format(string, sizeof(string), "* You didn't want to marry %s, no 'yes' was said.",GetPlayerNameEx(ProposedTo[playerid]));
SendClientMessageEx(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "* %s did't want to marry you, no 'yes' was said.",GetPlayerNameEx(playerid));
SendClientMessageEx(ProposedTo[playerid], COLOR_YELLOW, string);
return 0;
}
else
{
MarriageCeremoney[playerid] = 0;
ProposedTo[playerid] = 999;
return 0;
}
}
}
return 0;
}
if(CallLawyer[playerid] == 111)
{
if (strcmp("yes", text, true) == 0)
{
format(string, sizeof(string), "** %s is in jail, and needs a lawyer. Go to the Police Station.", GetPlayerNameEx(playerid));
SendJobMessage(2, TEAM_AZTECAS_COLOR, string);
SendJobMessage(2, TEAM_AZTECAS_COLOR, "* When you are at the Police Station, ask an officer to approve you with /accept lawyer.");
SendClientMessageEx(playerid, COLOR_LIGHTRED, "A message has been sent to all available lawyers, please wait.");
WantLawyer[playerid] = 0;
CallLawyer[playerid] = 0;
return 0;
}
else
{
SendClientMessageEx(playerid, COLOR_LIGHTRED, "There is no lawyer available to you anymore. Jail time has started.");
WantLawyer[playerid] = 0;
CallLawyer[playerid] = 0;
return 0;
}
}
if(TalkingLive[playerid] != INVALID_PLAYER_ID)
{
if(PlayerInfo[playerid][pJob] == 6 || PlayerInfo[playerid][pJob2] == 6)
{
format(string, sizeof(string), "Live News Reporter %s: %s", GetPlayerNameEx(playerid), text);
OOCNews(COLOR_LIGHTGREEN, string);
}
else
{
format(string, sizeof(string), "Live Interview Guest %s: %s", GetPlayerNameEx(playerid), text);
OOCNews(COLOR_LIGHTGREEN, string);
}
return 0;
}
if(Mobile[playerid] != INVALID_PLAYER_ID)
{
format(string, sizeof(string), "(cellphone) %s says: %s", GetPlayerNameEx(playerid), text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(Mobile[playerid] == 914)
{
if(!text[0])
{
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Dispatch: Sorry, I don't understand?");
return 0;
}
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Dispatch: We have alerted all units in the area.");
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Thank you for reporting this incident");
format(string, sizeof(string), "Dispatch: All Units IA: Caller: %s",GetPlayerNameEx(playerid));
SendFamilyMessage(4, COLOR_TWPINK, string);
format(string, sizeof(string), "Dispatch: Incident: %s",text);
SendFamilyMessage(4, COLOR_TWPINK, string);
CalledMedics[playerid] = 1;
MedicsCallTime[playerid] = 60;
ShowPlayerBeaconForMedics(playerid);
SendClientMessageEx(playerid, COLOR_GRAD2, " They hung up...");
Mobile[playerid] = INVALID_PLAYER_ID;
return 0;
}
if(Mobile[playerid] == 913)
{
if(!text[0])
{
SendClientMessageEx(playerid, COLOR_ALLDEPT, "EMERGENCY: Sorry, I don't understand?");
return 0;
}
if(strcmp("no", text, true) == 0)
{
SendClientMessageEx(playerid, COLOR_DBLUE, "Police HQ: We have alerted all units in the area.");
SendClientMessageEx(playerid, COLOR_DBLUE, "Thank you for reporting this crime.");
format(string, sizeof(string), "HQ: All Units APB: Reporter: %s",GetPlayerNameEx(playerid));
SendFamilyMessage(1, COLOR_DBLUE, string);
SendFamilyMessage(2, COLOR_DBLUE, string);
SendFamilyMessage(3, COLOR_DBLUE, string);
SendFamilyMessage(7, COLOR_DBLUE, string);
format(string, sizeof(string), "HQ: Crime: %s, Suspect: Unknown",PlayerCrime[playerid][pAccusing]);
SendFamilyMessage(1, COLOR_DBLUE, string);
SendFamilyMessage(2, COLOR_DBLUE, string);
SendFamilyMessage(3, COLOR_DBLUE, string);
SendFamilyMessage(7, COLOR_DBLUE, string);
CalledCops[playerid] = 1;
CopsCallTime[playerid] = 60;
ShowPlayerBeaconForCops(playerid);
SendClientMessageEx(playerid, COLOR_GRAD2, " They hung up...");
Mobile[playerid] = INVALID_PLAYER_ID;
return 0;
}
new badguy = ReturnUser(text);
if (IsPlayerConnected(badguy))
{
if(badguy != INVALID_PLAYER_ID)
{
if (WantedPoints[badguy] > 0)
{
SendClientMessageEx(playerid, COLOR_DBLUE, "Police HQ: Units are already assigned to that case...");
SendClientMessageEx(playerid, COLOR_DBLUE, "Thank you for reporting this crime.");
SendClientMessageEx(playerid, COLOR_GRAD2, " They hung up...");
Mobile[playerid] = INVALID_PLAYER_ID;
return 0;
}
if (badguy == playerid)
{
SendClientMessageEx(playerid, COLOR_DBLUE, "Police HQ: Don't fool around. This is an emergency line.");
SendClientMessageEx(playerid, COLOR_GRAD2, " They hung up...");
Mobile[playerid] = INVALID_PLAYER_ID;
return 0;
}
SendClientMessageEx(playerid, COLOR_DBLUE, "Police HQ: We have alerted all units in the area.");
SendClientMessageEx(playerid, COLOR_DBLUE, "Thank you for reporting this crime.");
format(string, sizeof(string), "HQ: All Units APB: Reporter: %s",GetPlayerNameEx(playerid));
SendFamilyMessage(1, COLOR_DBLUE, string);
SendFamilyMessage(2, COLOR_DBLUE, string);
SendFamilyMessage(3, COLOR_DBLUE, string);
SendFamilyMessage(7, COLOR_DBLUE, string);
format(string, sizeof(string), "HQ: Crime: %s, Suspect: Unknown",PlayerCrime[playerid][pAccusing]);
SendFamilyMessage(1, COLOR_DBLUE, string);
SendFamilyMessage(2, COLOR_DBLUE, string);
SendFamilyMessage(3, COLOR_DBLUE, string);
SendFamilyMessage(7, COLOR_DBLUE, string);
CalledCops[playerid] = 1;
CopsCallTime[playerid] = 60;
ShowPlayerBeaconForCops(playerid);
SendClientMessageEx(playerid, COLOR_GRAD2, " They hung up...");
Mobile[playerid] = INVALID_PLAYER_ID;
return 0;
}
return 0;
}
else
{
format(string, sizeof(string), "Police HQ: I have no information on %s, are you sure that's the correct name?",text);
SendClientMessageEx(playerid, COLOR_DBLUE, string);
return 0;
}
}
if(Mobile[playerid] == 912)
{
if(!text[0])
{
SendClientMessageEx(playerid, COLOR_ALLDEPT, "EMERGENCY: Sorry, I don't understand?");
return 0;
}
strmid(PlayerCrime[playerid][pAccusing], text, 0, strlen(text), 255);
SendClientMessageEx(playerid, COLOR_DBLUE, "Police HQ: If you know the assailant's name or part of it say it now or just say no.");
Mobile[playerid] = 913;
return 0;
}
if(Mobile[playerid] == 911)
{
if(!text[0])
{
SendClientMessageEx(playerid, COLOR_ALLDEPT, "EMERGENCY: Sorry, I don't understand - police or paramedic?");
return 0;
}
else if (strcmp("police", text, true) == 0)
{
SendClientMessageEx(playerid, COLOR_ALLDEPT, "EMERGENCY: I am patching you to police headquarters, please hold...");
Mobile[playerid] = 912;
SendClientMessageEx(playerid, COLOR_DBLUE, "Police HQ: Please give me a short description of the crime.");
return 0;
}
else if (strcmp("paramedic", text, true) == 0)
{
SendClientMessageEx(playerid, COLOR_ALLDEPT, "EMERGENCY: I am patching you to FDSA headquarters, please hold...");
Mobile[playerid] = 914;
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Dispatch: Please give me a short description of the incident.");
return 0;
}
else
{
SendClientMessageEx(playerid, COLOR_ALLDEPT, "EMERGENCY: Sorry, I don't understand - police or paramedic?");
return 0;
}
}
if(IsPlayerConnected(Mobile[playerid]))
{
if(Mobile[Mobile[playerid]] == playerid)
{
if(PlayerInfo[Mobile[playerid]][pSpeakerPhone] != 0)
{
format(string, sizeof(string), "(speakerphone) %s says: %s", GetPlayerNameEx(playerid), text);
ProxDetector(20.0, Mobile[playerid], string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
SendClientMessageEx(Mobile[playerid], COLOR_YELLOW,string);
}
if(PlayerInfo[playerid][pBugged] == 1)
{
format(string, sizeof(string), "(bug) %s (cellphone): %s", GetPlayerNameEx(playerid), text);
SendBugMessage(2, COLOR_LIGHTGREEN, string);
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_YELLOW,"There's nobody there!");
}
return 0;
}
sendername = GetPlayerNameEx(playerid);
if(GetPVarInt(playerid, "IsInArena") >= 0)
{
new a = GetPVarInt(playerid, "IsInArena");
if(PaintBallArena[a][pbGameType] == 2 || PaintBallArena[a][pbGameType] == 3 || PaintBallArena[a][pbGameType] == 5)
{
if(PlayerInfo[playerid][pPaintTeam] == 1)
{
format(string, sizeof(string), "[Paintball Arena] ({FF0000}Red Team{FFFFFF}) %s says: %s", sendername, text);
}
if(PlayerInfo[playerid][pPaintTeam] == 2)
{
format(string, sizeof(string), "[Paintball Arena] ({0000FF}Blue Team{FFFFFF}) %s says: %s", sendername, text);
}
}
else
{
format(string, sizeof(string), "[Paintball Arena] %s says: %s", sendername, text);
}
SendPaintballArenaMessage(a, COLOR_WHITE, string);
return 0;
}
switch(PlayerInfo[playerid][pAccent])
{
case 0, 1:
{
format(string, sizeof(string), "%s says: %s", sendername, text);
ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 2:
{
format(string, sizeof(string), "(British accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 3, 4, 5:
{
format(string, sizeof(string), "(Asian accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 6:
{
format(string, sizeof(string), "(Scottish accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 7:
{
format(string, sizeof(string), "(Irish accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 8:
{
format(string, sizeof(string), "(Russian accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 9:
{
format(string, sizeof(string), "(American accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 10, 12:
{
format(string, sizeof(string), "(Spanish accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 11:
{
format(string, sizeof(string), "(Southern Accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 13:
{
format(string, sizeof(string), "(Italian accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 14:
{
format(string, sizeof(string), "(Gangster accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 15:
{
format(string, sizeof(string), "(Australian accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 16:
{
format(string, sizeof(string), "(Arabic accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 17:
{
format(string, sizeof(string), "(Balkan accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 18:
{
format(string, sizeof(string), "(Canadian accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 19:
{
format(string, sizeof(string), "(Jamaican accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
case 20:
{
format(string, sizeof(string), "(Israeli accent) %s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
}
if(PlayerInfo[playerid][pBugged] == 1)
{
format(string, sizeof(string), "(bug) %s: %s", GetPlayerNameEx(playerid), text);
SendBugMessage(2, COLOR_LIGHTGREEN, string);
}
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Stranger[Masked_%d] Says: %s",MaskedName[playerid], text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
return 0;
}