10.12.2009, 12:09
Can someone tell me how to make a checkpoint that if someone is on it and write /robatm gets 1000$?
Originally Posted by Jeffry
Hmm, you could try it with IsPlayerInArea, but im not sure how it works...
Check the tutorial... |
public OnPlayerSpawn(playerid) { new atm=SetCheckpoint(playerid,x,y,z,sizeofcheckpoint); good size can be 2 to 8. } public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/robatm", true, 7)) { if(IsPlayerInCheckPoint(playerid)==1); GivePlayerMoney(playerid,1000); whatever amount you want return 1; }
new
g_moneyCP;
public OnPlayerSpawn(playerid)
{
g_moneyCP = SetPlayerCheckpoint( playerid, x, y, z, size ); //I recommend size from 2.0-7.0
return true;
}
if( !strcmp( cmdtext, "/robatm", true ) )
{
if( IsPlayerInCheckpoint( playerid ) == g_moneyCP )
return GivePlayerMoney( playerid, 1000 );
return false;
}
Originally Posted by lrZ^ aka LarzI
pawn Код:
|