Help me please choose skins to the CMDTEXT -
user226 - 07.04.2009
Hello. I have with other countries badly know English language. Sorry for my English
But still you try to ask you for help.
I want to do - when the team
/123 there was the choice of skin types as in the beginning as usual choose skin
Help pazhaluysta ..
If you have not understood what I want to write and I will try to explain the details.
please help.
Код:
if (strcmp("/123", cmdtext, true, 4) == 0)
{
return OnPlayerRequestClass(playerid)
}
NOT WORKING.;(
Re: Help me please choose skins to the CMDTEXT -
GTA_Rules - 07.04.2009
use SetupPlayerForClassSelection
Re: Help me please choose skins to the CMDTEXT -
user226 - 07.04.2009
And you can just details, I new people in Pawno
Re: Help me please choose skins to the CMDTEXT -
Rks25 - 07.04.2009
This?
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/skin", true) == 0)
{
ForceClassSelection(playerid);
SetPlayerHealth(playerid,0);
return 1;
}
return 0;
}
Re: Help me please choose skins to the CMDTEXT -
user226 - 07.04.2009
Yes in principle it is, thanks.
Or you may like the thread, so that in the place where the pressed command /skin after selecting a skin at the same place and stayed?
Re: Help me please choose skins to the CMDTEXT -
NeRoSiS - 07.04.2009
Код:
new skinchange[MAX_PLAYERS];
new float:skinx;
new float:skiny;
new float:skinz;
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/skin", true) == 0)
{
ForceClassSelection(playerid);
SetPlayerHealth(playerid,0);
GetPlayerPos(playerid, skinx, skiny, skinz);
skinchange[playerid] = 1;
return 1;
}
return 0;
}
public OnPlayerSpawn(playerid)
{
if{skinchange == 1)
{
SetPlayerPos(playerid, skinx, skiny, skinz);
skinchange[playerid] = 0;
}
return 1;
}
Thats exactly how it would work
Haven't tested, but seems fine to me
Re: Help me please choose skins to the CMDTEXT -
user226 - 07.04.2009
error:
(452) : error 033: array must be indexed (variable "skinchange")
(454) : warning 213: tag mismatch
(454) : warning 213: tag mismatch
(454) : warning 213: tag mismatch
(497) : warning 213: tag mismatch
(497) : warning 213: tag mismatch
(497) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
--------
This line:
(450)public OnPlayerSpawn(playerid)
(451){
(452) if{skinchange == 1)
(453) {
(454) SetPlayerPos(playerid, skinx, skiny, skinz);
(455) skinchange[playerid] = 0;
(497) GetPlayerPos(playerid, skinx, skiny, skinz);
Re: Help me please choose skins to the CMDTEXT -
ICECOLDKILLAK8 - 07.04.2009
Add
to the top of your script
Re: Help me please choose skins to the CMDTEXT -
NeRoSiS - 07.04.2009
Not just new skin change, it must be like this
new skinchange[MAX_PLAYERS];
Re: Help me please choose skins to the CMDTEXT -
ICECOLDKILLAK8 - 07.04.2009
Sorry, I didnt look at your code i just looked at your error