10.11.2011, 18:10
pawn Code:
if(Mobile[playerid] == 390) // Arms Dealer number // Ammount
{
if(PlayerInfo[playerid][pJob] > 8)
{
new randtime = random(3),h,mi,s;
#pragma unused s
gettime(h,mi,s);
if(mi > 30)
{
SendClientMessage(playerid, COLOR_WHITE, "Old Man (cellphone): I've got a important call. Beep.. Beep..");
SendClientMessage(playerid, COLOR_GRAD2, " They Hung Up..");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
Mobile[playerid] = 255;
return 0;
}
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Old Man: What did ya' say?.");
return 0;
}
else if ((strcmp("One", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("one")))
{
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(randtime == 0) { printf("Pick it up at %d:%d",h,mi+15); PlayerInfo[playerid][pPickupTime] = 15; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Yep, pick up your stuff behind Dillimore Pay and spray in fifteen minutes."); }
else if(randtime == 1) { printf("Pick it up at %d:%d",h,mi+20); PlayerInfo[playerid][pPickupTime] = 20; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff behind the Vinewood Gas in twenty minutes."); }
else if(randtime == 2) { printf("Pick it up at %d:%d",h,mi+18); PlayerInfo[playerid][pPickupTime] = 18; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff at the LS Stadium in twenty minutes."); }
else if(randtime == 3) { printf("Pick it up at %d:%d",h,mi+16); PlayerInfo[playerid][pPickupTime] = 16; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff in the bush behind Marina Burgershot in fifteen minutes."); }
Mobile[playerid] = 255;
return 0;
}
else if ((strcmp("Two", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("two")))
{
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(randtime == 0) { printf("Pick it up at %d:%d",h,mi+15); PlayerInfo[playerid][pPickupTime] = 15; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Yep, pick up your stuff behind Dillimore Pay and spray in fifteen minutes."); }
else if(randtime == 1) { printf("Pick it up at %d:%d",h,mi+20); PlayerInfo[playerid][pPickupTime] = 20; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff behind the Vinewood Gas in twenty minutes."); }
else if(randtime == 2) { printf("Pick it up at %d:%d",h,mi+18); PlayerInfo[playerid][pPickupTime] = 18; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff at the LS Stadium in twenty minutes."); }
else if(randtime == 3) { printf("Pick it up at %d:%d",h,mi+16); PlayerInfo[playerid][pPickupTime] = 16; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff in the bush behind Marina Burgershot in fifteen minutes."); }
Mobile[playerid] = 255;
return 0;
}
else if ((strcmp("Three", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("three")))
{
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(randtime == 0) { printf("Pick it up at %d:%d",h,mi+15); PlayerInfo[playerid][pPickupTime] = 15; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Yep, pick up your stuff behind Dillimore Pay and spray in fifteen minutes."); }
else if(randtime == 1) { printf("Pick it up at %d:%d",h,mi+20); PlayerInfo[playerid][pPickupTime] = 20; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff behind the Vinewood Gas in twenty minutes."); }
else if(randtime == 2) { printf("Pick it up at %d:%d",h,mi+18); PlayerInfo[playerid][pPickupTime] = 18; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff at the LS Stadium in twenty minutes."); }
else if(randtime == 3) { printf("Pick it up at %d:%d",h,mi+16); PlayerInfo[playerid][pPickupTime] = 16; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff in the bush behind Marina Burgershot in fifteen minutes."); }
Mobile[playerid] = 255;
return 0;
}
else if ((strcmp("Four", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("four")))
{
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(randtime == 0) { printf("Pick it up at %d:%d",h,mi+15); PlayerInfo[playerid][pPickupTime] = 15; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Yep, pick up your stuff behind Dillimore Pay and spray in fifteen minutes."); }
else if(randtime == 1) { printf("Pick it up at %d:%d",h,mi+20); PlayerInfo[playerid][pPickupTime] = 20; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff behind the Vinewood Gas in twenty minutes."); }
else if(randtime == 2) { printf("Pick it up at %d:%d",h,mi+18); PlayerInfo[playerid][pPickupTime] = 18; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff at the LS Stadium in twenty minutes."); }
else if(randtime == 3) { printf("Pick it up at %d:%d",h,mi+16); PlayerInfo[playerid][pPickupTime] = 16; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff in the bush behind Marina Burgershot in fifteen minutes."); }
Mobile[playerid] = 255;
return 0;
}
else if ((strcmp("Five", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("five")))
{
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(randtime == 0) { printf("Pick it up at %d:%d",h,mi+15); PlayerInfo[playerid][pPickupTime] = 15; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Yep, pick up your stuff behind Dillimore Pay and spray in fifteen minutes."); }
else if(randtime == 1) { printf("Pick it up at %d:%d",h,mi+20); PlayerInfo[playerid][pPickupTime] = 20; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff behind the Vinewood Gas in twenty minutes."); }
else if(randtime == 2) { printf("Pick it up at %d:%d",h,mi+18); PlayerInfo[playerid][pPickupTime] = 18; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff at the LS Stadium in twenty minutes."); }
else if(randtime == 3) { printf("Pick it up at %d:%d",h,mi+16); PlayerInfo[playerid][pPickupTime] = 16; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff in the bush behind Marina Burgershot in fifteen minutes."); }
Mobile[playerid] = 255;
return 0;
}
else if ((strcmp("Six", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("six")))
{
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(randtime == 0) { printf("Pick it up at %d:%d",h,mi+15); PlayerInfo[playerid][pPickupTime] = 15; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Yep, pick up your stuff behind Dillimore Pay and spray in fifteen minutes."); }
else if(randtime == 1) { printf("Pick it up at %d:%d",h,mi+20); PlayerInfo[playerid][pPickupTime] = 20; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff behind the Vinewood Gas in twenty minutes."); }
else if(randtime == 2) { printf("Pick it up at %d:%d",h,mi+18); PlayerInfo[playerid][pPickupTime] = 18; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff at the LS Stadium in twenty minutes."); }
else if(randtime == 3) { printf("Pick it up at %d:%d",h,mi+16); PlayerInfo[playerid][pPickupTime] = 16; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff in the bush behind Marina Burgershot in fifteen minutes."); }
Mobile[playerid] = 255;
return 0;
}
else if ((strcmp("Seven", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("seven")))
{
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(randtime == 0) { printf("Pick it up at %d:%d",h,mi+15); PlayerInfo[playerid][pPickupTime] = 15; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Yep, pick up your stuff behind Dillimore Pay and spray in fifteen minutes."); }
else if(randtime == 1) { printf("Pick it up at %d:%d",h,mi+20); PlayerInfo[playerid][pPickupTime] = 20; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff behind the Vinewood Gas in twenty minutes."); }
else if(randtime == 2) { printf("Pick it up at %d:%d",h,mi+18); PlayerInfo[playerid][pPickupTime] = 18; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff at the LS Stadium in twenty minutes."); }
else if(randtime == 3) { printf("Pick it up at %d:%d",h,mi+16); PlayerInfo[playerid][pPickupTime] = 16; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff in the bush behind Marina Burgershot in fifteen minutes."); }
Mobile[playerid] = 255;
return 0;
}
else if ((strcmp("Eight", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("eight")))
{
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(randtime == 0) { printf("Pick it up at %d:%d",h,mi+15); PlayerInfo[playerid][pPickupTime] = 15; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Yep, pick up your stuff behind Dillimore Pay and spray in fifteen minutes."); }
else if(randtime == 1) { printf("Pick it up at %d:%d",h,mi+20); PlayerInfo[playerid][pPickupTime] = 20; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff behind the Vinewood Gas in twenty minutes."); }
else if(randtime == 2) { printf("Pick it up at %d:%d",h,mi+18); PlayerInfo[playerid][pPickupTime] = 18; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff at the LS Stadium in twenty minutes."); }
else if(randtime == 3) { printf("Pick it up at %d:%d",h,mi+16); PlayerInfo[playerid][pPickupTime] = 16; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff in the bush behind Marina Burgershot in fifteen minutes."); }
Mobile[playerid] = 255;
return 0;
}
else if ((strcmp("Nine", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("nine")))
{
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(randtime == 0) { printf("Pick it up at %d:%d",h,mi+15); PlayerInfo[playerid][pPickupTime] = 15; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Yep, pick up your stuff behind Dillimore Pay and spray in fifteen minutes."); }
else if(randtime == 1) { printf("Pick it up at %d:%d",h,mi+20); PlayerInfo[playerid][pPickupTime] = 20; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff behind the Vinewood Gas in twenty minutes."); }
else if(randtime == 2) { printf("Pick it up at %d:%d",h,mi+18); PlayerInfo[playerid][pPickupTime] = 18; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff at the LS Stadium in twenty minutes."); }
else if(randtime == 3) { printf("Pick it up at %d:%d",h,mi+16); PlayerInfo[playerid][pPickupTime] = 16; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff in the bush behind Marina Burgershot in fifteen minutes."); }
Mobile[playerid] = 255;
return 0;
}
else if ((strcmp("Ten", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("ten")))
{
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(randtime == 0) { printf("Pick it up at %d:%d",h,mi+15); PlayerInfo[playerid][pPickupTime] = 15; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Yep, pick up your stuff behind Dillimore Pay and spray in fifteen minutes."); }
else if(randtime == 1) { printf("Pick it up at %d:%d",h,mi+20); PlayerInfo[playerid][pPickupTime] = 20; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff behind the Vinewood Gas in twenty minutes."); }
else if(randtime == 2) { printf("Pick it up at %d:%d",h,mi+18); PlayerInfo[playerid][pPickupTime] = 18; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff at the LS Stadium in twenty minutes."); }
else if(randtime == 3) { printf("Pick it up at %d:%d",h,mi+16); PlayerInfo[playerid][pPickupTime] = 16; SendClientMessage(playerid, COLOR_ALLDEPT, "Old Man (cellphone): Sure, pick up your stuff in the bush behind Marina Burgershot in fifteen minutes."); }
Mobile[playerid] = 255;
return 0;
}
else
{
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SendClientMessage(playerid, COLOR_WHITE, "Old Man: What did ya' say?.");
SendClientMessage(playerid, COLOR_GREY, "(( Tell him how many parts you want. ))");
return 0;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Old Man: I have no idea who I am talking to, see ya.");
}
}
if(Mobile[playerid] == 397) // Arms Dealer number
{
if(PlayerInfo[playerid][pJob] > 8)
{
if(!strlen(tmp))
{
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SendClientMessage(playerid, COLOR_WHITE, "Old Man (cellphone): Sorry, I didnt catch your order could you please tell it again.");
SendClientMessage(playerid, COLOR_GREY, "((You can choose between - {EE5555}SMGParts{FFFFFF} - {EE5555}RifleParts{FFFFFF} - {EE5555}HandgunParts{FFFFFF}))");
return 0;
}
else if ((strcmp("SMGparts", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("smgparts")))
{
new h,mi,s;
gettime(h,mi,s);
if(mi > 30)
{
SendClientMessage(playerid, COLOR_WHITE, "Old Man (cellphone): I've got a important call. Beep.. Beep..");
SendClientMessage(playerid, COLOR_GRAD2, " They Hung Up..");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
Mobile[playerid] = 255;
return 0;
}
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SendClientMessage(playerid, COLOR_WHITE, "Old Man (cellphone): Sounds great, I'll get them for you as soon as possible, partner.");
SendClientMessage(playerid, COLOR_WHITE, "Old Man (cellphone): But, how many of these parts are you in need of?");
Mobile[playerid] = 390;
return 0;
}
else if ((strcmp("RifleParts", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("rifleparts")))
{
new h,mi,s;
gettime(h,mi,s);
if(mi > 30)
{
SendClientMessage(playerid, COLOR_WHITE, "Old Man (cellphone): I've got a important call. Beep.. Beep..");
SendClientMessage(playerid, COLOR_GRAD2, " They Hung Up..");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
Mobile[playerid] = 255;
return 0;
}
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SendClientMessage(playerid, COLOR_WHITE, "Old Man (cellphone): Excellent choice, I'll get them for you as soon as possible, partner.");
SendClientMessage(playerid, COLOR_WHITE, "Old Man (cellphone): But, how many of these parts are you in need of?");
Mobile[playerid] = 390;
return 0;
}
else if ((strcmp("HandgunParts", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("handgunparts")))
{
new h,mi,s;
gettime(h,mi,s);
if(mi > 30)
{
SendClientMessage(playerid, COLOR_WHITE, "Old Man (cellphone): I've got a important call. Beep.. Beep..");
SendClientMessage(playerid, COLOR_GRAD2, " They Hung Up..");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
Mobile[playerid] = 255;
return 0;
}
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SendClientMessage(playerid, COLOR_WHITE, "Old Man (cellphone): Sounds easy, I'll get them for you as soon as possible, partner.");
SendClientMessage(playerid, COLOR_WHITE, "Old Man (cellphone): But, how many of these parts are you in need of?");
Mobile[playerid] = 390;
return 0;
}
else
{
format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerNameEx(playerid), text);
ProxDetector(15.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SendClientMessage(playerid, COLOR_WHITE, "Old Man (cellphone): Sorry, I didnt catch your order could you please tell it again.");
SendClientMessage(playerid, COLOR_GREY, "((You can choose between - {EE5555}SMG Parts{FFFFFF} - {EE5555}Rifle Parts{FFFFFF} - {EE5555}Handgun Parts{FFFFFF}))");
return 0;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Old Man: I have no idea who I am talking to, see ya.");
}
}
He should call this number and order stuff from a 'dealer'.
At the moment when I call this number comes up "Old man: Good day!Which kind of parts are you in need today?"
At this point according the code I need to insert name of part for ex : 'handgunparts' 'smgparts'.
But no matter what I type it gives me : "Old man: I have no idea who am I talking to, cya."
If you guys notice something wrong please share
Okay I found it :
pawn Code:
if(phonenumb == 397)
{
new h,mi,s;
gettime(h,mi,s);
if(mi > 30)
{
SendClientMessage(playerid, COLOR_WHITE, "Old Man (cellphone): I don't have time right now, call me later.");
SendClientMessage(playerid, COLOR_GRAD2, " They Hung Up..");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
Mobile[playerid] = 255;
return 1;
}
SendClientMessage(playerid, COLOR_WHITE, "Old Man: Good day! Which kind of parts are you in need of today?");
Mobile[playerid] = 397;
return 1;
}
The first pwn code is taken from OnPlayerText second is from OnDialogResponse