13.06.2010, 08:54
Hi
I have a question, i am busy with a property include and I made that with someone else, he had mysql, me not.
The problem is: When I do /createprop (interior ID) so for example /createprop 40
Then he only recognise /createprop the space between he doenst see.
In the sa-mp: Server, the black screen it says:
Returns string: 50 Value: 0
Can someone please help me that I can fix this?
Sorry for my not so good english
if(CompareString("/createprop",cmdtext))
{
if(!IsPlayerAdmin(playerid))
{//berichtje je hebt geen recht tot deze command
return SendClientMessage(playerid,COLOR_USAGE,"You are not allowed to use this command!");
}
cmdstring[0][1]=1;// kijk dit bedoel, in dat zwarte scherm komt er bij /createprop 50 te staan: returns string: 50 value: 0hmm iS DIt alles? of nog meer van /createprop is dit allesDan kan ik jou nu vertelle dat dit niet kan.
new realvalue;
realvalue=strval(strtok(cmdtext,cmdstring[0][1]));//
printf("returns string: %s value: %d",strtok(cmdtext,cmdstring[0][1]),realvalue);
if(realvalue<0 || realvalue>=sizeof(Property_Coordinates))
{
SendClientMessage(playerid,COLOR_USAGE,"/createprop [InteriorID]");
//berichtje verkeerde interieur ID opgegeven
}
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
if(CreateProperty(X,Y,Z,realvalue))
{
SendClientMessage(playerid,COLOR_WHITE,"Created!") ;
//message property created
}else
{
SendClientMessage(playerid,COLOR_WHITE,"Failed!");
//message property failed to create
}
return 1;
}
I have a question, i am busy with a property include and I made that with someone else, he had mysql, me not.
The problem is: When I do /createprop (interior ID) so for example /createprop 40
Then he only recognise /createprop the space between he doenst see.
In the sa-mp: Server, the black screen it says:
Returns string: 50 Value: 0
Can someone please help me that I can fix this?
Sorry for my not so good english
if(CompareString("/createprop",cmdtext))
{
if(!IsPlayerAdmin(playerid))
{//berichtje je hebt geen recht tot deze command
return SendClientMessage(playerid,COLOR_USAGE,"You are not allowed to use this command!");
}
cmdstring[0][1]=1;// kijk dit bedoel, in dat zwarte scherm komt er bij /createprop 50 te staan: returns string: 50 value: 0hmm iS DIt alles? of nog meer van /createprop is dit allesDan kan ik jou nu vertelle dat dit niet kan.
new realvalue;
realvalue=strval(strtok(cmdtext,cmdstring[0][1]));//
printf("returns string: %s value: %d",strtok(cmdtext,cmdstring[0][1]),realvalue);
if(realvalue<0 || realvalue>=sizeof(Property_Coordinates))
{
SendClientMessage(playerid,COLOR_USAGE,"/createprop [InteriorID]");
//berichtje verkeerde interieur ID opgegeven
}
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
if(CreateProperty(X,Y,Z,realvalue))
{
SendClientMessage(playerid,COLOR_WHITE,"Created!") ;
//message property created
}else
{
SendClientMessage(playerid,COLOR_WHITE,"Failed!");
//message property failed to create
}
return 1;
}