ATM Robbing system. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ATM Robbing system. (
/showthread.php?tid=128295)
ATM Robbing system. -
jamie009 - 17.02.2010
Ok so am fairly new into coding ok and am trying to make a /atmsteal system this is what i've got now am trying to use a pick up but while using a command text as well I know this will fail, but can you give me a suggestion on how to work around it or the possible best way to do it.
Код:
public OnPlayerPickUpPickup(playerid, pickupid, )
{
if(pickupid == ATMRob)
if (strcmp("/ATMSTEAL", cmdtext, true, 8) == 0) {
new Classcheck;
Classcheck = GetPlayerTeam(playerid);
if(Classcheck == 102) {
SendClientMessage(playerid, WHITE, "You are stealing from the Bank of Las Ventures, The police have been");
SendClientMessage(playerid, WHITE, "called, Your caught buddy.");
GivePlayerMoney(playerid, 5000);
}
else if(Classcheck == 101) {
SendClientMessage(playerid, RED, "You have to be a gangster to rob the ATM");
}
return 1;
}
return 0;
}
Yes I know it would have be in OnPlayerCommandText but I was just wondering a way I can work it using it as a pickup
Re: ATM Robbing system. -
jamie009 - 17.02.2010
bump.