message get spammed
#1

then i uses this command the message spamms that i unlocked it why?


Код:
dcmd_vunlock(playerid, params[])
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
	new file[256];
	format(file,sizeof(file),"cars/%d.cfg",GetPlayerVehicleID(playerid));
	if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Yellow, "FAIL: You're not in a vehicle.");
	else if(udb_hash(dini_Get(file,"OWNER")) != udb_hash(PlayerName(playerid))) return SendClientMessage(playerid, Yellow, "FAIL: You're not the owner of the vehicle.");
	else
	{
	new text[256];
	SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,0,0);
  SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),playerid,0,0);
  	format(text,sizeof(text),"*%s picks up his keys and unlocks the vehicle",PlayerName(playerid));
	SendClientMessage(playerid, Purple, text);
	dini_IntSet(file,"LOCK",0);
	new Float:X,Float:Y,Float:Z;
	GetPlayerPos(playerid, X, Y, Z);
	if(IsPlayerInRange(i,10.0,10.0,X,Y,Z))
	{
	if(playerid != i)
	{
	SendClientMessage(i, Purple, text);
	}
	}
	}
	}
	return 1;
}
Reply


Messages In This Thread
message get spammed - by friped93 - 25.04.2010, 13:37
Re: message get spammed - by MadeMan - 25.04.2010, 13:56

Forum Jump:


Users browsing this thread: 1 Guest(s)