public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING); SetPlayerChatBubble(playerid, "Im a tank RAWR!", yellow, 40.0, 0);

if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "rhinobot", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, tank, 0); //Putting the NPC into the vehicle we created for it.
SetPlayerChatBubble(playerid, "Im a tank RAWR!", yellow, 40.0, -1);
}
return 1;
}
|
Originally Posted by [mad
MLK (dino-host.net) ]
Should this work?: Код:
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "rhinobot", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, tank, 0); //Putting the NPC into the vehicle we created for it.
SetPlayerChatBubble(playerid, "Im a tank RAWR!", yellow, 40.0, -1);
}
return 1;
}
|
|
Originally Posted by Jay_
Why use a 3D Text label when you can use a chat bubble which has better font, can be handled from a single function call, and doesn't require any external timers or anything?
|
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "rhinobot", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, tank, 0); //Putting the NPC into the vehicle we created for it.
new tanklabel;
tanklabel = Create3DTextLabel("Im a tank RAWR!!",0x008080FF,0.0,0.0,0.0,0.0,0);
Attach3DTextLabelToVehicle(tanklabel, tank, 0.0, 0.0, 0.0);
}
return 1;
}
C:\Users\user\Desktop\SAMP Server\Everything World\gamemodes\EverythingWorldTwoBeta.pwn(323) : warning 213: tag mismatch C:\Users\user\Desktop\SAMP Server\Everything World\gamemodes\EverythingWorldTwoBeta.pwn(324) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings.