Solved
#1

Hey again, I wanted to know as i've locked the skins with some help.


Now when u try to spawn it says "this skin is for Jay only!"


I've changed it to show a textdraw but i want the textdraw to disapear after like 5 seconds.


If You can help please reply.
Reply
#2

pawn Код:
SetTimerEx("HideClassTextDraw", 5000, false, "i", playerid); //OnPlayerRequestSpawn

forward HideClassTextDraw(playerid);
public HideClassTextDraw(playerid)
{
  TextDrawHideForPlayer(playerid,TextDrawNameHere);
}
Reply
#3

Quote:
Originally Posted by Killa_
pawn Код:
SetTimerEx("HideClassTextDraw", 5000, false, "i", playerid); //OnPlayerRequestSpawn

forward HideClassTextDraw(playerid);
public HideClassTextDraw(playerid)
{
  TextDrawHideForPlayer(playerid,TextDrawNameHere);
}
Ok are give it ago thanks again killa.
Reply
#4

Make sure you put the HideClassTextdraw fuction at the bottom of your script out of any callback.
Reply
#5

Hmm i'm getin 4 errors


Errors ->
Код:
C:\Users\(lewis)\Desktop\New Folder (4)\U.pwn(66) : error 029: invalid expression, assumed zero
C:\Users\(lewis)\Desktop\New Folder (4)\U.pwn(66) : error 017: undefined symbol "HideClassTextDraw"
C:\Users\(lewis)\Desktop\New Folder (4)\U.pwn(67) : error 029: invalid expression, assumed zero
C:\Users\(lewis)\Desktop\New Folder (4)\U.pwn(67) : error 017: undefined symbol "HideClassTextDraw"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Maybe i done somthing wrong




Code ->
Код:
#include <a_samp>
new ChosenClass[MAX_PLAYERS];
new Text:help2;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	help2 = TextDrawCreate(200,300,"I'm sorry but~n~But this skin~n~Is for Jay only");
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(101, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(285, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, -1782.5294,539.1637,194.9415);
	SetPlayerFacingAngle(playerid,241.7837);
	SetPlayerCameraPos(playerid, -1776.6428,534.9046,194.9415);
	SetPlayerCameraLookAt(playerid, -1782.5294,539.1637,194.9415);
	ChosenClass[playerid] = classid;
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{  new PlayerName[MAX_PLAYER_NAME];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  if(ChosenClass[playerid] == 0 && strcmp(PlayerName,"Jay",false) != 0)
  {
    SendClientMessage(playerid,0x33AA33AA,"This skin is only for Jay!");
	  return 0;
	}
	SetTimerEx("HideClassTextDraw", 5000, false, "i", playerid);
	
	forward HideClassTextDraw(playerid);
	public HideClassTextDraw(playerid)
	{
    TextDrawHideForPlayer(playerid,help2);
	}
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerPrivmsg(playerid, recieverid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		// Do something here
		return 1;
	}
	return 0;
}

public OnPlayerInfoChange(playerid)
{
	return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}
Reply
#6

Код:
#include <a_samp>
new ChosenClass[MAX_PLAYERS];
new Text:help2;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	help2 = TextDrawCreate(200,300,"I'm sorry but~n~But this skin~n~Is for Jay only");
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(101, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(285, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, -1782.5294,539.1637,194.9415);
	SetPlayerFacingAngle(playerid,241.7837);
	SetPlayerCameraPos(playerid, -1776.6428,534.9046,194.9415);
	SetPlayerCameraLookAt(playerid, -1782.5294,539.1637,194.9415);
	ChosenClass[playerid] = classid;
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{  new PlayerName[MAX_PLAYER_NAME];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  if(ChosenClass[playerid] == 0 && strcmp(PlayerName,"Jay",false) != 0)
  {
    SendClientMessage(playerid,0x33AA33AA,"This skin is only for Jay!");
	  return 0;
	}
	SetTimerEx("HideClassTextDraw", 5000, false, "i", playerid);
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerPrivmsg(playerid, recieverid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		// Do something here
		return 1;
	}
	return 0;
}

public OnPlayerInfoChange(playerid)
{
	return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}
forward HideClassTextDraw(playerid);
	public HideClassTextDraw(playerid)
	{
    TextDrawHideForPlayer(playerid,help2);
	}
Reply
#7

Quote:
Originally Posted by Etch ❽ H
Код:
#include <a_samp>
new ChosenClass[MAX_PLAYERS];
new Text:help2;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	help2 = TextDrawCreate(200,300,"I'm sorry but~n~But this skin~n~Is for Jay only");
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(101, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(285, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, -1782.5294,539.1637,194.9415);
	SetPlayerFacingAngle(playerid,241.7837);
	SetPlayerCameraPos(playerid, -1776.6428,534.9046,194.9415);
	SetPlayerCameraLookAt(playerid, -1782.5294,539.1637,194.9415);
	ChosenClass[playerid] = classid;
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{  new PlayerName[MAX_PLAYER_NAME];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  if(ChosenClass[playerid] == 0 && strcmp(PlayerName,"Jay",false) != 0)
  {
    SendClientMessage(playerid,0x33AA33AA,"This skin is only for Jay!");
	  return 0;
	}
	SetTimerEx("HideClassTextDraw", 5000, false, "i", playerid);
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerPrivmsg(playerid, recieverid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		// Do something here
		return 1;
	}
	return 0;
}

public OnPlayerInfoChange(playerid)
{
	return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}
forward HideClassTextDraw(playerid);
	public HideClassTextDraw(playerid)
	{
    TextDrawHideForPlayer(playerid,help2);
	}

Thanks complied succesfully but don't i need to forward the timer?
Reply
#8

Why not use a Game Text For Player? I hate TDs, but if you use transparency or others then thats ok
Reply
#9

Quote:
Originally Posted by ("GгNSTг")
Quote:
Originally Posted by Etch ❽ H
Код:
#include <a_samp>
new ChosenClass[MAX_PLAYERS];
new Text:help2;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	help2 = TextDrawCreate(200,300,"I'm sorry but~n~But this skin~n~Is for Jay only");
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(101, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(285, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, -1782.5294,539.1637,194.9415);
	SetPlayerFacingAngle(playerid,241.7837);
	SetPlayerCameraPos(playerid, -1776.6428,534.9046,194.9415);
	SetPlayerCameraLookAt(playerid, -1782.5294,539.1637,194.9415);
	ChosenClass[playerid] = classid;
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{  new PlayerName[MAX_PLAYER_NAME];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  if(ChosenClass[playerid] == 0 && strcmp(PlayerName,"Jay",false) != 0)
  {
    SendClientMessage(playerid,0x33AA33AA,"This skin is only for Jay!");
	  return 0;
	}
	SetTimerEx("HideClassTextDraw", 5000, false, "i", playerid);
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerPrivmsg(playerid, recieverid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		// Do something here
		return 1;
	}
	return 0;
}

public OnPlayerInfoChange(playerid)
{
	return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}
forward HideClassTextDraw(playerid);
	public HideClassTextDraw(playerid)
	{
    TextDrawHideForPlayer(playerid,help2);
	}

Thanks complied succesfully but don't i need to forward the timer?
already forwarded it
Reply
#10

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
  new PlayerName[MAX_PLAYER_NAME];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  SetTimerEx("HideClassTextDraw", 5000, false, "i", playerid);
  if(ChosenClass[playerid] == 0 && strcmp(PlayerName,"Jay",false) != 0)
  {
   SendClientMessage(playerid,0x33AA33AA,"This skin is only for Jay!");
   return 0;
  }
  return 1;
}

//Bottom Of Your Script, Out Of Any Callback.
forward HideClassTextDraw(playerid);
public HideClassTextDraw(playerid)
{
  TextDrawHideForPlayer(playerid,TextDrawNameHere);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)