21.06.2009, 10:34
hi im new to this im picking it up quite fast if you could please show me how to make an /arrest command i could make all the others thx
it just a standard script nothing special besides the strok[/language lol i did this lmao
public OnPlayerCommmandText(playerid, cmdtext[])
if(strcmp("/Heal", cmdtext, true, 10) == TEAM_MEDIC)
{
SetPlayerHealth(playerid,100);
GivePlayerMoney(playerid,1000); // THis is for the payment![Cheesy](images/smilies/biggrin.png)
return 1;
}
if(strcmp("/arrest", cmdtext, true, 10) == TEAM_COP)
{
SendClientMessage(playerid,COLOR_ORANGE,"You Have Been Arrested");
SetPlayerPos(playerid,198.0301, 161.8855, 1003.0234);
GivePlayerMoney(playerid,5000); // THis is for the payment![Cheesy](images/smilies/biggrin.png)
return 1;
}
else if(strcmp("/ticket", cmdtext, true, 10) == TEAM_COP)
{
SendClientMessage(playerid,COLOR_YELLOW,"You Have Been given a ticket type /pay or be arrested");
GivePlayerMoney(playerid,500); // THis is for the payment![Cheesy](images/smilies/biggrin.png)
return 1;
}
return 0;
}
as you could imagine yeah lmao no where near that was just a guestimate i only started scripting yesterday so id say not 2 bad of an attempt
![Cheesy](images/smilies/biggrin.png)
public OnPlayerCommmandText(playerid, cmdtext[])
if(strcmp("/Heal", cmdtext, true, 10) == TEAM_MEDIC)
{
SetPlayerHealth(playerid,100);
GivePlayerMoney(playerid,1000); // THis is for the payment
![Cheesy](images/smilies/biggrin.png)
return 1;
}
if(strcmp("/arrest", cmdtext, true, 10) == TEAM_COP)
{
SendClientMessage(playerid,COLOR_ORANGE,"You Have Been Arrested");
SetPlayerPos(playerid,198.0301, 161.8855, 1003.0234);
GivePlayerMoney(playerid,5000); // THis is for the payment
![Cheesy](images/smilies/biggrin.png)
return 1;
}
else if(strcmp("/ticket", cmdtext, true, 10) == TEAM_COP)
{
SendClientMessage(playerid,COLOR_YELLOW,"You Have Been given a ticket type /pay or be arrested");
GivePlayerMoney(playerid,500); // THis is for the payment
![Cheesy](images/smilies/biggrin.png)
return 1;
}
return 0;
}
as you could imagine yeah lmao no where near that was just a guestimate i only started scripting yesterday so id say not 2 bad of an attempt