Help /vw - 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)
+--- Thread: Help /vw (
/showthread.php?tid=311813)
Help /vw -
Dan_Barocu - 18.01.2012
i made a cmd and i doesent work..please help i want each player to set his own virtualworld PLease help!
Код:
//----------------------------------[VW]-----------------------------------------------
if(strcmp(cmd, "/vw", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
new playa;
tmp = strtok(cmdtext, idx);
virid = strvalEx(tmp);
{
if(IsPlayerConnected(playa))
{
PlayerInfo[playa][pVirWorld] = virid;
format(string, sizeof(string), "** You have set %s's (%d) virtual world to %d.", giveplayer,playa, virid);
}
}
return 1;
}
Re: Help /vw -
Dan_Barocu - 18.01.2012
please help me..im romanian
Re: Help /vw -
Konstantinos - 18.01.2012
pawn Код:
if(strcmp(cmd, "/vw", true) == 0)
{
if(IsPlayerConnected(playerid)) {
tmp = strtok(cmdtext, idx);
if(!isnull(tmp)) return SendClientMessage(playerid, -1, "SYNTAX: /vw <Virtual World ID");
new
playa;
tmp = strtok(cmdtext, idx);
virid = strvalEx(tmp);
if(IsPlayerConnected(playa)) {
SetPlayerVirtualWorld(playa, virid);
format(string, sizeof(string), "** You have set %s's (%d) virtual world to %d.", giveplayer,playa, virid);
}
}
return 1;
}
Re: Help /vw -
Dan_Barocu - 18.01.2012
got errors please test it..try it and il give you an rep
Re: Help /vw -
milanosie - 18.01.2012
what errors?. post them so we can see
Re: Help /vw -
CmZxC - 18.01.2012
Do you have strtok defined in your script?
EDIT:
Fixed code at my last post here.
Re: Help /vw -
thimo - 18.01.2012
Quote:
Originally Posted by Dan_Barocu
got errors please test it..try it and il give you an rep
|
How would you do this? u dont have rep
Re: Help /vw -
milanosie - 18.01.2012
Quote:
Originally Posted by thimo
How would you do this? u dont have rep
|
Also, I dont think people find reputation points really important (Yes I know its in my signature, just to lazy to remove it)
Re: Help /vw -
CmZxC - 18.01.2012
pawn Код:
if(strcmp(cmd, "/vw", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!isnull(tmp)) return SendClientMessage(playerid, -1, "SYNTAX: /vw <Virtual World ID");
new virid;
virid = strvalEx(tmp);
SetPlayerVirtualWorld(playerid, virid);
format(string, sizeof(string), "** You have set your virtual world to %d.", virid);
SendClientMessage(playerid, -1,string);
}
return 1;
}
Re: Help /vw -
Dan_Barocu - 18.01.2012
i got a problem i put this at middle buy accident ..how do i repair it?i put my gm in middle please help.