Convert to if strcmp instead of ZCMD
#1

Can anyone convert this to if strcmp?? do it and you'll get a reputation

Код:
CMD:addpickup(playerid, params[])
{
	new ModelID, Type;
	if(unformat(params,"dd",ModelID,Type)) return SendClientMessage(playerid, 0xFFFFFF,"USAGE: /AddPickup < Pickup ID > < Type >");

	new Float:X,Float:Y,Float:Z;
	GetPlayerPos(playerid,X,Y,Z);
	CreateSavedPickup(ModelID,Type,X,Y,Z);
	new Msg[128];
	format(Msg,sizeof(Msg),"Pickup Successfully Created. (Model: %d) (Type: %d)",ModelID,Type);
	SendClientMessage(playerid, 0xFFFFFF,Msg);
	return 1;
}

CMD:removepickup(playerid, params[])
{
	new PickupID;
	if(unformat(params,"d",PickupID)) return SendClientMessage(playerid, 0xFFFFFF,"USAGE: /RemovePickup < Pickup ID >");
	if(!IsValidDynamicPickup(pInfo[PickupID][PID])) return SendClientMessage(playerid, 0xFFFFFFF, "ERROR: Pickup Does Not Exist!");

	DestroyDynamicPickup(pInfo[PickupID][PID]);

	format(pFile, sizeof(pFile), PICKUPFILE, PickupID);
	if(dini_Exists(pFile))
	{
		dini_Remove(pFile);
		dini_IntSet(pIDFile, "Total Pickups:", dini_Int(pIDFile, "Total Pickups:")-1);
	}

	new Msg[128];
	format(Msg,sizeof(Msg),"Pickup ID: %d Was 1Destroyed!",PickupID);
	SendClientMessage(playerid, 0xFFFFFFF,Msg);
	return 1;
}
THANK YOU, HELP ME AND YOU'LL GET A REPUTATION!.
Reply


Messages In This Thread
Convert to if strcmp instead of ZCMD - by Stanford - 24.01.2013, 15:58
Re: Convert to if strcmp instead of ZCMD - by FUNExtreme - 24.01.2013, 17:01
Re: Convert to if strcmp instead of ZCMD - by Roach_ - 24.01.2013, 17:06

Forum Jump:


Users browsing this thread: 1 Guest(s)