Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Question

Posted

cum fac la aceasta  comanda

if (strcmp("/vamasf", cmdtext, true, 10) == 0)

{

if(GetPlayerMoney(playerid)<3000)return SendClientMessage(playerid,~0,"Nu ai destui bani!");

MoveObject(gate,625.89111328125, -1184.0915527344, 27.495820999146,3.5);

GivePlayerMoney(playerid,-3000 );

SendClientMessage(playerid,COLOR_GREEN,"Poarta deschisa, treci repede");

SendClientMessage(playerid,COLOR_PURPLE,"Poarta se va inchide in 5 secunde");

SendClientMessage(playerid,COLOR_PURPLE,"Ai platit vama cu 3000 $");

SetTimer("gateclose", 5000, 0);

return 1;

}

  sa mearga sa fie folosita doar dintr`un anumit punct ...ceva cu playertopoint sau nush....stie cnv?
Snapshot_2012_03_07_003934.jpg

1 answer to this question

Recommended Posts

Posted

http://wiki.sa-mp.com/wiki/IsPlayerInRangeOfPoint

Uite cum:

if (strcmp("/vamasf", cmdtext, true, 10) == 0)
{
	if( !IsPlayerInRangeOfPoint( playerid, 10.0, X, Y, Z ) ) return SendClientMessage( playerid, ~0, "Nu esti langa vama !" ):
	if( GetPlayerMoney( playerid ) < 3000 ) return SendClientMessage( playerid, ~0, "Nu ai destui bani!" );
	MoveObject( gate, 625.89111328125, -1184.0915527344, 27.495820999146, 3.5 );
	GivePlayerMoney( playerid, -3000 );
	SendClientMessage( playerid, COLOR_GREEN, "Poarta deschisa, treci repede" );
	SendClientMessage( playerid, COLOR_PURPLE, "Poarta se va inchide in 5 secunde" );
	SendClientMessage( playerid, COLOR_PURPLE, "Ai platit vama cu 3000 $" );
	SetTimer( "gateclose", 5000, 0 );
	return 1;
}

X, Y, Z - inlocuiesti cu coordonatele langa care trebuie sa fie jucatorul ca sa deschida vama.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.