SA-MP Forums Archive
how do i do this - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how do i do this (/showthread.php?tid=127853)



how do i do this - Keeboo13 - 15.02.2010

SetTimer("CustomPickups", 1000, 1);
AddStaticPickup(1274, 2,2026.4064,1017.9352,10.8203);


were can i put it in my GM to make it work


Re: how do i do this - Jeffry - 15.02.2010

Just put it on bottom of your script

pawn Код:
forward CustomPickups();
public CustomPickups()
{
AddStaticPickup(1274, 2,2026.4064,1017.9352,10.8203);
//... More pickups here
return 1;
}
And this at OnGameModeInt

pawn Код:
SetTimerEx("CustomPickups",1000,0,"d");

Untested, but should work.



Re: how do i do this - Niixie - 15.02.2010

Damit, you were before me

pawn Код:
forward CustomPickups();

public CustomPickups()
{
   AddStaticPickup(1274, 2,2026.4064,1017.9352,10.8203);
   return 1;
}
if its not that, then explain what you want it to do?


Re: how do i do this - Keeboo13 - 15.02.2010

okay now i got this.... C:\Users\Big_Money\Downloads\SZR GTA ROLEPLAY\RealityRolePlay\RealityRolePlay\gamemodes \gtarp.pwn(884) : error 017: undefined symbol "ReturnUser"

and here is da code

Код:
	if(strcmp(cmd, "/transfer", true) == 0 || strcmp(cmd, "/wiretransfer", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if(!PlayerToPoint(20.0,playerid,2305.688964,-16.088100,26.749599))
	    {
	      SendClientMessage(playerid, COLOR_GREY, "  You are not at the Bank !");
	      return 1;
	    }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /transfer [playerid/PartOfName] [amount]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /transfer [playerid/PartOfName] [amount]");
				return 1;
			}
			moneys = strval(tmp);
			if (IsPlayerConnected(giveplayerid))
			{
			  if(giveplayerid != INVALID_PLAYER_ID)
			  {
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					playermoney = PlayerInfo[playerid][pBank] ;
					if (moneys > 0 && playermoney >= moneys)
					{
						PlayerInfo[playerid][pBank] -= moneys;
						PlayerInfo[giveplayerid][pBank] += moneys;
						format(string, sizeof(string), "  You have transferd $%d to %s's account", moneys, giveplayer,giveplayerid);
						PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
						SendClientMessage(playerid, COLOR_GRAD1, string);
						format(string, sizeof(string), "  You have recieved $%d to into your account from %s", moneys, sendername, playerid);
						SendClientMessage(giveplayerid, COLOR_GRAD1, string);
						format(string, sizeof(string), "%s transferd $%d to %s", sendername, moneys, giveplayer);
		        if(moneys >= 500000)
						{
							ABroadCast(COLOR_YELLOW,string,1);
						}
						printf("%s", string);
						PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
					}
					else
					{
						SendClientMessage(playerid, COLOR_GRAD1, "  Invalid transaction amount.");
					}
				}
			}
			else
			{
				format(string, sizeof(string), "  %d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_GRAD1, string);
			}
		}
		return 1;
	}



Re: how do i do this - Niixie - 15.02.2010

i'd say dcmd/zcmd and sscanf. way easier


Re: how do i do this - Keeboo13 - 15.02.2010

im almost done now i get
Код:
 error 006: must be assigned to an array
Код:
#define ReturnUser
Код:
giveplayerid = ReturnUser(tmp);
wat do i do plz help